SVM Learning implementation