【发布时间】:2021-06-27 03:29:08
【问题描述】:
我对 pydotplus.grapg_from_dot_data 的 write_png 模块有疑问。实际上,它甚至没有作为 graph_from_dot_data 的模块出现。 这是我的代码:
dtree = DecisionTreeClassifier()
dtree.fit(X,y)
data = tree.export_graphviz(dtree , out_file=None , feature_names= features)
graph = pydotplus.graph_from_dot_data(data).write_png('mydecisiontree.png')
这是引发的错误:
pydotplus.graphviz.InvocationException: GraphViz's executables not found
你们知道怎么解决吗?
【问题讨论】:
标签: graphviz decision-tree pydotplus