1. A method of inspecting a specimen, the method comprising: using an inspection system at one or more operating modes, obtaining images of a plurality of training regions of a specimen, wherein the training regions are identified as defect-free; deriving three or more basis training images from the images of the training regions; forming a classifier based on the three or more basis training images by minimizing distances from a affine linear space to a plurality of feature vectors from the three or more basis training images; using the inspection system at the one or more operating modes, obtaining images of a plurality of test regions of a specimen; deriving three or more basis test images from the test regions; and applying the classifier to the three or more basis test images to find defects in the test regions.