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] #208

Closed
draconcio12 opened this issue Jun 18, 2022 · 9 comments
Closed

[BUG] #208

draconcio12 opened this issue Jun 18, 2022 · 9 comments

Comments

@draconcio12
Copy link

AttributeError: 'STLSQ' object has no attribute '_preprocess_data', Running the example

Reproducing code example:

model = ps.SINDy(feature_names=["x", "y"])
model.fit(X, t=t)

Error message:

AttributeError: 'STLSQ' object has no attribute '_preprocess_data'

PySINDy/Python version information:

1.7 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0]

@akaptano
Copy link
Collaborator

See Issue #179. You need an older version of sklearn (1.0 or older) or the newest version of the main branch.

@panandreou
Copy link

I don't understand how to fix the problem. pip does not allow me to put an older version of sklearn and I don't
understand what is meant of the newest version of the main branch. I have the latest python and the latest pysindy.

@Jacob-Stevens-Haas
Copy link
Member

pip does not allow me to put an older version of sklearn

What is the output of

pip install scikit-learn~=0.0

@panandreou
Copy link

panandreou commented Jul 6, 2022 via email

@panandreou
Copy link

panandreou commented Jul 6, 2022 via email

@Jacob-Stevens-Haas
Copy link
Member

Ok wow. Looks like this is an issue installing numpy in the push to make packages PEP-517 compliant. What is your pip version? AFAIK, pip version 22 is the first one with full PEP-517 compatibility. Try upgrading pip if it isn't already at version 22.

This is the limit of my knowledge. If upgrading pip doesn't work, you will have to look for answers of how to install sklearn/numpy.

@Jacob-Stevens-Haas
Copy link
Member

Alternatively, clone the repo and install the current version of master, as Alan said above. The next release will be compatible with scikit-learn~=1.0

git clone https://github.com/dynamicslab/pysindy
pip install ./pysindy

@panandreou
Copy link

panandreou commented Jul 6, 2022 via email

@panandreou
Copy link

panandreou commented Jul 6, 2022 via email

jpcurbelo pushed a commit to jpcurbelo/pysindy_fork that referenced this issue May 9, 2024
* Varibale Parsing for Experiment Names

A minimal implementation of a variable parsing for the expriment name. I am not sure how good it is yet, but wanted to share. What is good about it, is that it does not use eval. I do, however, have doubts since the current solution replaces the curly brackets "{}" with the dictionary information to access them via format.n

Experiment name parsing

This update makes the code easier and provides some features for the experiment-name parsing. Users can now inject config arguments into their experiment name by using curly brackets (e.g.`experiment_name="my_model_is{model}"` will inject the chosen model into the experiment name). On top of that, the update comes with a "extremely useful" future that allows neural hydrologists to use {random_name} to inject a randomly named string into the experiment name.
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

4 participants