1. An information processing apparatus comprising: a processor and memory; a preliminary learning unit configured to make a plurality of preliminary discriminators perform learning, each of the preliminary discriminators includes cascade-connected weak discriminators with no branches and learns to discriminate a corresponding one of combinations of variation ranges for a plurality of variation categories which do not depend on each other; an evaluation unit configured to obtain discrimination results of the plurality of preliminary discriminators learned by the preliminary learning unit, by inputting, samples classified according to the combinations of variation ranges for the plurality of variation categories, to the preliminary discriminators so as to perform the discrimination processing on the samples using respective preliminary discriminators and evaluate discrimination ability of the variation categories based on discrimination results of the plurality of preliminary discriminators; a determination unit configured to determine an order of discriminating the variation categories in a main discriminator according to a descending order of the discrimination ability of the variation categories; a main discriminator generation unit configured to generate a main discriminator which has a branch structure of multiple layers by setting each of the multiple layers to discriminate a variation in respective one of the plurality of variation categories, so that variations in the plurality of variation categories should be discriminated in the determined order of discriminating the variation categories; and a main learning unit configured to make the main discriminator perform learning.