diff --git a/svm/svm_author_id.py b/svm/svm_author_id.py index fda3f7fdb28..6f352caa681 100644 --- a/svm/svm_author_id.py +++ b/svm/svm_author_id.py @@ -18,7 +18,14 @@ ### and testing datasets, respectively ### labels_train and labels_test are the corresponding item labels features_train, features_test, labels_train, labels_test = preprocess() - +clf=svm.SVC(kernel="linear") +clf.fit(features_train,labels_train) +pred=clf.predict(features_test) +from sklearn.metrics import accuracy_score +acc = accuracy_score(pred, labels_test) + +def submitAccuracy(): + return acc