You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built a CHAID decision tree and I got a tree object with the code tree_obj = tree.to_tree().
Afterwards, I have tried to save the tree into a dict file with the command tree_obj.to_dict(),
but I got the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/LuisG/anaconda3/lib/python3.8/site-packages/treelib/tree.py", line 964, in to_dict
tree_dict = {ntag: {"children": []}}
File "/home/LuisG/anaconda3/lib/python3.8/site-packages/CHAID/node.py", line 42, in __hash__
return hash(self.__dict__)
TypeError: unhashable type: 'dict'
Something similar happens when I tried to save the tree as a JSON file.
The text was updated successfully, but these errors were encountered:
Hello.
I have built a CHAID decision tree and I got a tree object with the code
tree_obj = tree.to_tree()
.Afterwards, I have tried to save the tree into a dict file with the command
tree_obj.to_dict()
,but I got the following error:
Something similar happens when I tried to save the tree as a JSON file.
The text was updated successfully, but these errors were encountered: