text_html_output_1.png
from IPython.display import SVG

from IPython.display import display

from graphviz import Source

from sklearn import tree

import pandas as pd

DATA_DIR = '/kaggle/input/mds-misis-test/'
train = pd.read_csv(DATA_DIR + 'train.csv')

X = train.drop(['Outcome'], axis=1)
y = train.Outcome

clf = tree.DecisionTreeClassifier(criterion='entropy', max_depth=6)

clf.fit(X, y)

graph = Source(tree.export_graphviz(clf, out_file=None, feature_names=list(X), class_names=['1', '0'], filled=True))
display(SVG(graph.pipe(format='svg')))