Added svm_train/recognize, helpers for svm routine