Training an SVM model