I want to change my decision tree boxes to circle or diamond with tree.export_graphviz but I can't. Is there any solotion for this?
Actully there is no solotion for this problem based on sklearn site.
sklearn.tree.export_graphviz involves:
sklearn.tree.export_graphviz(decision_tree, out_file=None, *, max_depth=None, feature_names=None, class_names=None, label='all', filled=False, leaves_parallel=False, impurity=True, node_ids=False, proportion=False, rotate=False, rounded=False, special_characters=False, precision=3, fontname='helvetica')
And there is not any code for changing shapes. My code is:
clf = tree.DecisionTreeClassifier(random_state=42)
dot_data = tree.export_graphviz(clf,
filled=True, rounded=True,
special_characters=True,
feature_names = ['a','b','c','d','e'],
class_names=target_names
)
graph = graphviz.Source(dot_data)