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 part 2/3 #493

Closed Jacob-Stevens-Haas closed 2 months ago

Jacob-Stevens-Haas commented 2 months ago

This is part 2/3, clarifying the way constraints are applied and allowing other constraints to be added to Trapping problems, by dispatching all to Constrainted SR3. It also solves some bugs in cvxpy probs. Part 3/3 will be the Mai's local trapping bit.

Currently there is a small hack - constraints are added at initialization, but in order to add trapping constraints, we need to know the size of the problem, which are data-dependent parameters. Solution in the interim is to add arguments to init that begin with an underscore.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 95.79832% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 94.68%. Comparing base (80171b7) to head (cb1ab37).

Files Patch % Lines
pysindy/optimizers/constrained_sr3.py 92.59% 2 Missing :warning:
pysindy/optimizers/trapping_sr3.py 96.82% 2 Missing :warning:
pysindy/feature_library/polynomial_library.py 95.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #493 +/- ## ========================================== - Coverage 94.81% 94.68% -0.14% ========================================== Files 38 38 Lines 3996 4081 +85 ========================================== + Hits 3789 3864 +75 - Misses 207 217 +10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.