dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.36k stars 304 forks source link

Trapping constraints #437

Closed Jacob-Stevens-Haas closed 2 months ago

Jacob-Stevens-Haas commented 6 months ago

I wanted to share this work as a draft that adds _make_constraints() from example 8 to trapping_sr3.py. All the differences are noted in the commit messages, but the big ones are:

Also a draft because I enabled too many PolynomialLibrary options. include_interaction=False would be incompatible with the trapping constraints IIUC. OTOH, connecting to powers_ gives us include_bias=True and interaction_only=True constraints for free.

akaptano commented 6 months ago

@Jacob-Stevens-Haas or @MPeng5 Have you checked the updated trapping constraints are consistent with @MPeng5 's branch? Mai, it might be worth merging your branch into this pull request and then rewriting your examples to be consistent with the new syntax here.

Jacob-Stevens-Haas commented 6 months ago

Oh damn, sorry, I thought I responded a while ago. TL; DR they should be consistent, but mine aren't int target/feature format - user has to flatten them to whichever format they want (there is code in the docstring for each type).

I'll check when I get back from break.

Jacob-Stevens-Haas commented 5 months ago

Note to self: