train_models function

Train machine learning models on training data