Trainer API and trainers for naive bayes, logit & SVM