My code is follow the class of machine learning of google.The two code are same.I don\'t know why it show error.May be the type of variable is error.But google\'s code is sa
I use Anaconda. Here's what worked for me: run from terminal:
conda install python-graphviz
conda install pydot ## don't forget this <-----------------
Then run
clf = clf.fit(train_data, train_target)
tree.export_graphviz(clf,out_file='tree.dot')
Then from the terminal:
dot -Tpng tree.dot -o tree.png