A method includes: a) preparing as training data a sample set that
contains a plurality of samples belonging to a first class and a
plurality of samples belonging to a second class; b) generating, by
performing discriminant analysis on the sample set, a first discriminant
function having a high classification characteristic for the first class
and a second discriminant function having a high classification
characteristic for the second class; c) by classifying the sample set
using the first and second discriminant functions, isolating any sample
whose classification results by the first and second discriminant
functions do not match; d) forming a new sample set by grouping together
any sample thus isolated, and repeating b) and c) by using the new sample
set; and e) causing d) to stop when the number of samples each of whose
classification results do not match in c) has decreased to or below a
predetermined value.