1. A method of selecting a profile model for use in examining a structure formed on a semiconductor wafer using optical metrology, the method comprising: a) obtaining an initial profile model having a set of profile parameters; b) training a machine learning system using the initial profile model; c) generating a simulated diffraction signal for an optimized profile model using the trained machine learning system, wherein the optimized profile model has a set of profile parameters with the same or fewer profile parameters than the initial profile model; d) determining if one or more termination criteria are met; and e) if the one or more termination criteria are not met, modifying the optimized profile model and iterating steps c) to e), wherein the same trained machine learning system is used in iterating step c).