I got an error by exporting the classification tree to graphviz and i
don't know how to handle
Traceback (most recent call last):
File "task5.py", line 101, in <module>
f = tree.export_graphviz(clf_1,out_file=f)
File "C:\Python27\lib\site-packages\sklearn\tree\tree.py", line
_graphviz
recurse(decision_tree.tree_, 0)
File "C:\Python27\lib\site-packages\sklearn\tree\tree.py", line
e
left_child = tree.children_left[node_id]
AttributeError: 'NoneType' object has no attribute 'children_left'
It works with other problems but into this case, i don't know.
Code Snip:
from StringIO import StringIO
with open("task5_tree.dot", 'w') as f:
f = tree.export_graphviz(clf_1,out_file=f)
best regards
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general