关系图/流程图绘制方法

graphviz

1、生成dot文件
from sklearn.tree import export_graphviz
export_graphviz(
tree_clf,
out_file="./iris_tree.dot",
feature_names=iris.feature_names[:],
class_names=iris.target_names,
rounded=True,
filled=True
)
2、用graphviz生成图片
.\dot -Tpng D:\PythonProject\AI_Study\decision_tree\iris_tree.dot -o D:\PythonProject\AI_Study\decision_tree\iris_tree.png

你可能感兴趣的:(关系图/流程图绘制方法)