cross validation code for all classifiers.