Simple SVM implementation