Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'RCTree' object has no attribute 'codisp_with_cut_dimension' #105

Open
duarteharris opened this issue Nov 13, 2024 · 1 comment

Comments

@duarteharris
Copy link

Hi.

I'm following the example to obtain feature importance here, and even copying and running the code there as is, I get the following error:

AttributeError: 'RCTree' object has no attribute 'codisp_with_cut_dimension'

referring to the line:

   for tree in forest:
       for leaf in tree.leaves:
-->        codisp,cutdim = tree.codisp_with_cut_dimension(leaf)

Any ideia why might that be?

Thank you,

@AtanasGruev
Copy link

Hello, I could replicate the problem. It seems that you have installed rrcf by means of PyPi, pip install rrcf which installs rrcf v.0.4.4. However, that version of the package was uploaded on Apr 30, 2023 whereas the code implementing codisp_with_cut_dimension (PR #100) was merged into master afterwards on May 22, 2023 (see commit history). The solution therefore is to install from source by running pip install rrcf/. I have tested it and it seems to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants