text_plain_output_1.png
from sklearn import tree

from sklearn.metrics import accuracy_score,precision_score,confusion_matrix,f1_score,classification_report

classifier = tree.DecisionTreeClassifier(max_depth=2, random_state=0)
classifier.fit(X_train, y_train)
predictions = classifier.predict(X_test)
print(accuracy_score(y_test, predictions))
print(precision_score(y_test, predictions))