fit.learner function

Fits a model to the training data