1. An apparatus comprising: a calculation unit configured to calculate a distribution of a difference in feature amount between a plurality of learning patterns; a first generation unit configured to generate a probability distribution by normalizing the distribution of the difference calculated by the calculation unit; a determination unit configured to determine, based on the probability distribution, a pixel in the learning pattern; and a second generation unit configured to generate a discriminator based on the determined pixel in the learning pattern, wherein at least one processor functions as at least one of the units.