1. A method for generating information to be used for selecting values for one or more parameters of a detection algorithm, comprising: performing a scan of an area of a wafer using an inspection system and default values for one or more parameters of a detection algorithm to detect defects on the wafer, wherein the area of the wafer comprises an entire area of the wafer that will be scanned using an inspection recipe, and wherein the scan is performed without user intervention; selecting a portion of the defects from results of the scan based on a predetermined maximum number of total defects to be used for selecting values for the one or more parameters of the detection algorithm; and storing information for the portion of the defects, wherein the information comprises values for the one or more parameters of the detection algorithm determined for the defects in the portion, and wherein the information can be used to select the values for the one or more parameters of the detection algorithm to be used for the inspection recipe without performing an additional scan of the wafer subsequent to the scan.