text_plain_output_1.png
from dtreeviz.trees import dtreeviz

from sklearn import datasets

from sklearn.tree import DecisionTreeClassifier

iris = datasets.load_iris()

model = DecisionTreeClassifier(random_state=42)
model.fit(iris.data, iris.target)

model.predict(iris.data)

viz = dtreeviz(model, iris.data, iris.target, target_name='target', feature_names=iris.feature_names, class_names=list(iris.target_names))
viz.save('regression.svg')
viz