Performs cross-validation in a classifier, i.e. it divides a given training set into
N parts (more precisely, for each category present in the training set, the observations
belonging each category are partitioned into N parts), for each i=1,...,N trains a
classifier on the union of all parts except i, and measures the performance on part i.
The final performance measure is the average on these N rounds.
This methods takes a trainer and a training set and returns the performance
(in [0,1]) of the trained classifier on the training set (e.g. using
cross-validation). The larger the value the better the trained classifier.