Hi Markus.
Are you using the current master branch?
If so, could you maybe provide a pickle file of your tree so we can
reproduce the problem?
Thanks,
Andy
On 04/27/2014 03:14 PM, Markus Gruber wrote:
> 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)
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general