Trainer for a libsvm