Code for support vector machine (SVM)