1. An information processing apparatus which classify input information by using a plurality of pieces of reference information, the apparatus comprising: an acquisition unit configured to set a plurality of reference locations of data in information as one reference location pattern and acquire a feature amount obtained from a value of data of one of the plurality of pieces of reference information in the one reference location pattern for each of a plurality of different reference location patterns and the plurality of pieces of reference information; an extraction unit configured to extract data included in the input information in accordance with each of the plurality of reference location patterns; a selection unit configured to select the reference location pattern used for classification of the input information from the plurality of reference location patterns based on a value of the extracted data; and an execution unit configured to execute classification of the input information by using the feature amount in the selected reference location pattern and data included in the input information at a reference location indicated by the reference location pattern.