0
我想显示的树输出,但是当我运行下面的脚本,我收到一个错误,如:的GraphViz的可执行文件未找到:蟒蛇-3
InvocationException:GraphViz的的可执行文件未找到
我在这里搜索了类似的话题,但大多数都与Mac相关。我使用Windows 10 64位操作系统,并使用Anaconda-3 64位。我很想听听你的建议。
#Displaying the decision tree
from sklearn import tree
#from StringIO import StringIO
from io import StringIO
#from StringIO import StringIO
from IPython.display import Image
out = StringIO()
tree.export_graphviz(classifier, out_file=out)
import pydotplus
graph=pydotplus.graph_from_dot_data(out.getvalue())
Image(graph.create_png())
编辑:我已经安装了再次的graphviz和pydotplus模块,但现在还在工作。