1. A computer-implemented method for selecting one or more parameters for a defect detection method, comprising: acquiring information for a set of classified defects, wherein the classified defects were detected on a wafer using an inspection system, and wherein the classified defects comprise defects of interest and nuisance defects; acquiring an objective for a defect detection method, wherein the defect detection method is to be applied to output generated for wafers by one or more detectors of an inspection system to thereby detect defects on the wafers, and wherein the objective is specified by a user; and selecting one or more parameters of the defect detection method using an optimization function and the information for the set of classified defects such that the one or more parameters satisfy the objective, wherein acquiring the information, acquiring the objective, and said selecting are performed using a computer system.