Machine Learning To Tackle the Challenges of Transient and Soft Errors in Complex Circuits