Changed a bit the api of classifier.