Open RamSnoussi opened 1 month ago
Hi, Because encoding the type of y_ become from string to int64 (line 223 HierarchicalClassifier.py). Then the type of traversals (line 164 Explainer.py) is int64. However self.hierarchicalmodel.root (line 170 Explainer.py) is string. Then the file Explainer.py should be updated.
Hi @mirand863, Do you have any suggestions about this issue?
Hi @RamSnoussi,
Can you please explain a bit how you are using the explainer? Are you using with encoded labels related to the other issue we were discussing previously so the root should also be an integer? Is that correct?
Hi @mirand863, I'm using the hiclass version v4.10.0 (https://github.com/scikit-learn-contrib/hiclass). Look please the example above and the error generated (traversals[:, 0] = self.hierarchicalmodel.root in line 170 Explainer.py). This error is due because traversals[:,0] is an Integer and self.hierarchicalmodel.root is a string. You modified the version of hiclass by adding the encoder (in file HierarchicalClassifier.py) but Explainer.py shoud be updated too.
This attacked file (HierarchicalClassifier.py) is in my execution environment when you used Encoder in line 221. However, the encoder has been deleted in github's version (https://github.com/scikit-learn-contrib/hiclass/blob/main/hiclass/HierarchicalClassifier.py) but why? which released version can I use? HierarchicalClassifier.txt
This attacked file (HierarchicalClassifier.py) is in my execution environment when you used Encoder in line 221. However, the encoder has been deleted in github's version (https://github.com/scikit-learn-contrib/hiclass/blob/main/hiclass/HierarchicalClassifier.py) but why? which released version can I use? HierarchicalClassifier.txt
I see now. The encoder has not been released yet, but is only available in this branch called cuml https://github.com/scikit-learn-contrib/hiclass/compare/main...cuml
I was just testing it out and never actually released. I also did not need the explainer in my use case, so I did not update that file. I might be able to do it in the next days if it is important for your use case. I can add tests and try to make it run without bugs with a proper release. :)
Hi @mirand863, Have you updated the explainer's file that corresponds to encoder add ?Thanks.
hi @mirand863 What's the problem here? How can I correct this error?