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

[BUG] self.n_input_features_ AttributeError -- (PySINDy doesn't work with scikit-learn 1.0) #124

Closed
A3EKV opened this issue Sep 25, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@A3EKV
Copy link

A3EKV commented Sep 25, 2021

Hello,
Today I have updated scikit-learn to version 1.0 and it seems that Pysindy is not compatible with this version yet.
Any plans to upgrade PySINDy to support sklearn 1.0?

Thank you

@akaptano
Copy link
Collaborator

We are planning a new release shortly (a few weeks) with lots of new SINDy functionality. I will try to fix this for the new release.

@akaptano akaptano added the bug Something isn't working label Sep 28, 2021
@akaptano
Copy link
Collaborator

Fixed this in the new release. Hopefully will get this out in a few weeks. For future reference, the issue is that scikit-learn 1.0 and beyond has decided that self.n_inputs_features_ should be called self.n_features_in_ so the fix is we have to check the scikit-learn version whenever assigning this variable for now.

@akaptano akaptano changed the title [BUG] Pysindy doesn't work with scikit-learn 1.0 [BUG] self.n_input_features_ AttributeError -- (PySINDy doesn't work with scikit-learn 1.0) Oct 21, 2021
@emanuele
Copy link

emanuele commented Dec 1, 2021

Hi, I see that this bug is still present in the master branch - I've just cloned and tried the basic example of the guide triggering the bug. What about a quick fix by constraining the version of scikit-learn to be less than 1.0? Something like:

scikit-learn[alldeps]>=0.23, <1.0

in requirements.txt. It worked for me.

In any case, thank you for pysindy!! :)

@akaptano
Copy link
Collaborator

akaptano commented Dec 1, 2021

Hi Emanuele!

Glad you're using the code. You're right that this is an easy fix but we are waiting for the new release (hopefully here by the end of the week) where we have fixed the bug and allow for scikit-learn version 1.0 and above as well. Keep an eye out for that :)

@emanuele
Copy link

emanuele commented Dec 1, 2021

Thank you for the very good news!

@akaptano
Copy link
Collaborator

akaptano commented Dec 5, 2021

The new release is out, with a fix to this bug, so closing this issue now. Let me know if you encounter any more scikit-learn issues.

@akaptano akaptano closed this as completed Dec 5, 2021
jpcurbelo pushed a commit to jpcurbelo/pysindy_fork that referenced this issue May 9, 2024
* Add issue templates drafts

* Add default title

* Update .github/ISSUE_TEMPLATE/bug_report.md

Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com>

* Update bug_report.md

Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com>
jpcurbelo pushed a commit to jpcurbelo/pysindy_fork that referenced this issue May 9, 2024
Co-authored-by: Hamshaw, Scott Douglas <shamshaw@usgs.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants