ryanmadden / decision-tree

C4.5 Decision Tree python implementation with validation, pruning, and attribute multi-splitting
81 stars 39 forks source link

How can I save the root object? #6

Closed MichaelGofron closed 8 years ago

MichaelGofron commented 8 years ago

Hello,

I am trying to save and load your root object which generates a decision tree but it's not working the way I expected.

I do pickle.dump( obj, open( fileName, "wb" ) ) to save the object and then pickle.load( open( fileName, "rb" ) ) to load the object. I've done this with other python objects and it works properly and it does save the decision tree, but when I try to load it it says 'AttributeError: 'module' object has no attribute 'treeNode''.

Might you have an alternative way to save and load the object or know what might be going wrong?

ryanmadden commented 8 years ago

I'm not sure I understand your question. What's your objective with this?