text_plain_output_1.png
from sklearn import tree

from sklearn import tree

from sklearn import tree

train.dtypes

pred = clf.predict(test)
pred

predict = clf.predict_proba(test)
predict

from sklearn import tree
from sklearn.tree import DecisionTreeClassifier
x = train.drop('TARGET', axis=1)
y = train.TARGET
clf = tree.DecisionTreeClassifier()
clf = clf.fit(x, y)

from sklearn import tree
from sklearn.tree import DecisionTreeClassifier
x = train.drop('TARGET', axis=1)
y = train.TARGET
clf = tree.DecisionTreeClassifier(max_depth=2, random_state=0, splitter='best')
clf = clf.fit(x, y)
tree.plot_tree(clf)