add: added support for training the classifer

* changed the interface for the classifier call to explicitely include the call
  arguments
* improved unittest.