1. A method of examining a structure formed on a semiconductor wafer, the method comprising: a) obtaining a first diffraction signal measured from the structure using an optical metrology device; b) inputting the first diffraction signal as an input to a first machine learning system; c) after b), receiving a profile as an output of the first machine learning system with the first diffraction signal as the input to the first machine learning system, the profile having one or more parameters that characterize one or more features of the structure; d) after c), inputting the profile as an input to a second machine learning system; e) after d), receiving a second diffraction signal as an output of the second machine learning system with the profile as the input to the second machine learning system; f) comparing the first diffraction signal to the second diffraction signal; g) when the first and second diffraction signals match within one or more matching criteria, determining one or more features of the structure to be those characterized by the one or more parameters of the profile used as the input to the second machine learning system; and h) when the first and second diffraction signals do not match within one or more matching criteria, altering one or more parameters of the profile and iterating steps d)-f) using the profile with the altered one or more parameters.