From faff64fb38c1ac2f61591131b8a9a48a2b66a9c2 Mon Sep 17 00:00:00 2001 From: Ayush Pandey <59275479+Ayush7-BIT@users.noreply.github.com> Date: Fri, 17 Jul 2020 22:55:22 +0530 Subject: [PATCH] Updated dt_author_id.py --- decision_tree/dt_author_id.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/decision_tree/dt_author_id.py b/decision_tree/dt_author_id.py index 006afb8357b..10fceed74bb 100644 --- a/decision_tree/dt_author_id.py +++ b/decision_tree/dt_author_id.py @@ -24,7 +24,13 @@ ######################################################### ### your code goes here ### +from sklearn import tree +clf=tree.DecisionTreeClassifier() +clf.fit(features_train, labels_train ) +pred=clf.predict(features_test) +from sklearn.metrics import accuracy_score +acc=accuracy_score(pred,labels_test) #########################################################