Answers for "how to visualize decision tree in python"

0

how to visualize decision tree in python

import graphviz
# DOT data
dot_data = tree.export_graphviz(clf, out_file=None, 
                                feature_names=iris.feature_names,  
                                class_names=iris.target_names,
                                filled=True)

# Draw graph
graph = graphviz.Source(dot_data, format="png") 
graph
Posted by: Guest on August-27-2021

Code answers related to "how to visualize decision tree in python"

Python Answers by Framework

Browse Popular Code Answers by Language