📜  如何在 python 代码示例中可视化决策树

📅  最后修改于: 2022-03-11 14:47:08.179000             🧑  作者: Mango

代码示例1
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