jupyter中使用graphviz
参考:
https://www.cnblogs.com/zhanjiahui/p/11335038.html
https://blog.csdn.net/linxid/article/details/79386223
Anaconda安装Graphviz
1、打开Anaconda终端,openterminal
2、终端输入:
conda install graphviz
pip install graphviz
打开jupyter:
jupyter lab
引入graphviz:
import graphviz
报错处理
加上out_file=None
import graphviz
dot_data = tree.export_graphviz(clf
,feature_names = feature_name
,class_names=["琴酒","雪莉","贝尔摩德"]
,filled=True
,rounded=True
,out_file=None
)
graph = graphviz.Source(dot_data)
graph