決策樹Python 3.5程式
from IPython.display import Image
from sklearn import tree
import pydotplus
from pydotplus import graphviz
dot_data = tree.export_graphviz(clf, out_file=None,
feature_names=iris.feature_names,
class_names=iris.target_names,
filled=True, rounded=True,
special_characters=True)
graph = pydotplus.graphviz.graph_from_dot_data(dot_data)
Image(graph.create_png())

運行出現“AttributeError: 'NoneType' object has no attribute 'write'”
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/47586.html
標籤:基礎類
上一篇:C++builder WebBroker CGI 如何獲得POST值?
下一篇:Builder2010運行時錯誤
