From bd1fa3fcd4c596d780b09ef2b712f270d8804a56 Mon Sep 17 00:00:00 2001 From: samanvay-winner <62996293+samanvay-winner@users.noreply.github.com> Date: Thu, 4 Jun 2020 20:03:31 +0530 Subject: [PATCH] Update svm_author_id.py --- svm/svm_author_id.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/svm/svm_author_id.py b/svm/svm_author_id.py index fda3f7fdb28..6159ebf6cfe 100644 --- a/svm/svm_author_id.py +++ b/svm/svm_author_id.py @@ -24,6 +24,14 @@ ######################################################### ### your code goes here ### +import sklearn.svm import SVC +clf = SVC() #Default params here +clf.fit(features_train, features_test) +yhat = clf.predict(labels_train) + +from sklearn.metrics import accuracy_score +acc = accuracy_score(yhat, labels_test) +print(acc) #########################################################