text_plain_output_1.png
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report

from sklearn.metrics import accuracy_score, confusion_matrix, classification_report

from sklearn.tree import DecisionTreeClassifier

from sklearn.tree import DecisionTreeClassifier, plot_tree, export_text

import pandas as pd

df = pd.read_csv('/kaggle/input/iris-flower-dataset/IRIS.csv')

from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier()
clf.fit(X_train, y_train)

from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
prediction = clf.predict(X_test)
accuracy_score(y_test, prediction)

pd.crosstab(y_test, prediction, rownames=['Reel'], colnames=['Predisction'])