A structure formed on a semiconductor wafer can be examined using a support vector machine. A profile model of the structure is obtained. The profile model is defined by profile parameters that characterize the geometric shape of the structure. A set of values for the profile parameters is obtained. A set of simulated diffraction signals is generated using the set of values for the profile parameters, each simulated diffraction signal characterizing the behavior of light diffracted from the structure. The support vector machine is trained using the set of simulated diffraction signals as inputs to the support vector machine and the set of values for the profile parameters as expected outputs of the support vector machine. A measured diffraction signal off the structure is obtained. The measured diffraction signal is inputted into the trained support vector machine. Values of profile parameters of the structure are obtained as an output from the trained support vector machine.