training the classifier