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

Are there any plans to extend this to SINDY with control (SINDYc)? #66

Closed
billtubbs opened this issue Apr 25, 2020 · 6 comments
Closed

Comments

@billtubbs
Copy link
Contributor

Presumably I can't use PySindy 'out-of-the-box' for a problem with actuated control inputs. Or is there a way?

If not, are there any plans to extend this to SINDY with control (SINDYc)?

thanks.

@briandesilva
Copy link
Member

There isn't a straightforward way to include actuated control inputs at the moment. SINDYc is on our roadmap, but I can make it a higher priority and implement it soon if it would be useful to you.

@briandesilva
Copy link
Member

This is related to #40. I'm going to close issue in favor of that one and work on getting this implemented this week.

@billtubbs
Copy link
Contributor Author

Excellent. Thanks.

@billtubbs
Copy link
Contributor Author

If it helps, I published my own SINDy code below including examples of how to use it for systems with actuated inputs (SINDYc). As it turned out, this was quite easy to do in my case — I didn't need to change the SINDy code at all to include control inputs.

The two Jupiter notebooks show examples of identifying the Lorenz system, one without the control input and one with. Also note, these notebooks also show how to do sparse regression with existing Scikit-Learn tools. Might be interesting to investigate how Scikit-Learn does sparse feature selection and see how it differs from the SINDy method.

https://github.com/billtubbs/dyn-opt

@briandesilva
Copy link
Member

I took a look at your repo -- I love the look of those plots!

I'm just about done with the SINDYc implementation. Well, the implementation is done, but I still need to write some unit tests and examples. It looks like we both approached it the same way; it essentially comes down to adding the control inputs without changing the left-hand side.

I agree with your observation about sklearn's feature selection. It definitely seems worth looking into.

@billtubbs
Copy link
Contributor Author

billtubbs commented Apr 28, 2020

I figured out one deficiency with scikit-learn's feature selection approach. If you try to find a sparse model for a function with more than one output variable using SelectFromModel(estimator, threshold, max_features), it comes up with a reduced set of features (inputs) that is common to all output variables. So when you do the subsequent linear regression step it may use more coefficients than it should for some variables. If that makes sense. Whereas SINDy finds a coefficient matrix.

@briandesilva briandesilva mentioned this issue Apr 29, 2020
jpcurbelo pushed a commit to jpcurbelo/pysindy_fork that referenced this issue May 9, 2024
Previously, using a run that resulted from a continue_training execution as the basis for finetuning wouldn't work.
The reason was that the base config would still have the `is_continue_training` flag and thus basetrainer would try to continue training.
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