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

Align projection tensor calculations with master #499

Closed Jacob-Stevens-Haas closed 1 month ago

Jacob-Stevens-Haas commented 1 month ago

This PR extracts the simplified routines for creating the projection tensors. The simplification is possible because of explicitly relying on the PolynomialLibrary through the helper function _build_lib_info, which allows methods to look up indexes for relevant terms. As a result, the PQ and PL matrices now have tests to ensure they are built correctly.

We also remove the check_P_tensors function, because we have explicit tests.

Finally, this also

For review, start with the tests, then the projection calculations. If desired, see the helper functions.

Jacob-Stevens-Haas commented 1 month ago

Ok I'm going to merge this one now, I need to start digging into the algorithm stuff