-
Notifications
You must be signed in to change notification settings - Fork 328
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] Cannot run the example code #179
Comments
What are your pysindy and sklearn versions? |
I get the same error with pysindy 1.7 and sklearn 1.1.0. Actually about half of the tests seem to be failing. Looks like this might be the culprit: scikit-learn/scikit-learn#22762 They changed Also, since |
Thanks for the reply. Yes, I think the problem comes from the version of the scikit-learn. If I created a new env and |
@briandesilva Any thoughts on the fix? This is a bit how sklearn version 1.0 broke the column normalization functionality in the sklearn regression. Thanks Jared for pointing out the issue |
I have the latest version of python and the latest version of pysindy. The error is still occurring. I don't understand what is meant by the newest version of the main branch. pip will not let me install an older version of sklearn. |
I just installed pysindy on my computer through "pip install pysindy".
However, I failed to run the example codes. It always shows 'STLSQ' object has no attribute '_preprocess_data'.
I installed python through Anaconda, and I used spyder to run the code.
Reproducing code example:
Error message:
Traceback (most recent call last):
File "C:\Users\AppData\Local\Temp\ipykernel_11640\1278902783.py", line 16, in <cell line: 16>
model.fit(X, t=t)
File "d:\pysindy.py", line 563, in fit
self.model.fit(x, x_dot)
File "E:\anaconda3\envs\pysindy\lib\site-packages\sklearn\pipeline.py", line 382, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "d:\pysindy\optimizers\sindy_optimizer.py", line 58, in fit
self.optimizer.fit(x, y)
File "d:\pysindy\optimizers\base.py", line 134, in fit
x, y, X_offset, y_offset, X_scale = self._preprocess_data(
AttributeError: 'STLSQ' object has no attribute '_preprocess_data'
The text was updated successfully, but these errors were encountered: