dynamicslab / pysindy

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

Remove legacy ensembling #354

Closed Jacob-Stevens-Haas closed 1 year ago

Jacob-Stevens-Haas commented 1 year ago

Only significant change (other than removal of the legacy method) is that SINDy() no longer attaches coef_list from EnsembleOptimizer as an attribute. That only happened with legacy ensembling, not when the optimizer kwarg was set as an EnsembleOptimizer, but it changes a few of the tests.

Removes a few tests that existed to check the highly-coupled way that ensembling works. Now that ensembling is encapsulated in EnsembleOptimizer, the multiplicity of tests to make sure it works with every possible optimizer and feature library aren't useful.

Also, FWIW, inside a bound method of class Foo, super() and super(Foo, self) are the same.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 93.33% and project coverage change: +0.13 :tada:

Comparison is base (ac61b4a) 93.95% compared to head (e8fd274) 94.08%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #354 +/- ## ========================================== + Coverage 93.95% 94.08% +0.13% ========================================== Files 37 37 Lines 3688 3620 -68 ========================================== - Hits 3465 3406 -59 + Misses 223 214 -9 ``` | [Impacted Files](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab) | Coverage Δ | | |---|---|---| | [pysindy/feature\_library/identity\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvaWRlbnRpdHlfbGlicmFyeS5weQ==) | `96.55% <ø> (-0.42%)` | :arrow_down: | | [pysindy/feature\_library/parameterized\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvcGFyYW1ldGVyaXplZF9saWJyYXJ5LnB5) | `100.00% <ø> (ø)` | | | [pysindy/feature\_library/polynomial\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvcG9seW5vbWlhbF9saWJyYXJ5LnB5) | `98.00% <ø> (-0.06%)` | :arrow_down: | | [pysindy/optimizers/base.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9vcHRpbWl6ZXJzL2Jhc2UucHk=) | `92.30% <83.33%> (+0.70%)` | :arrow_up: | | [pysindy/feature\_library/base.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvYmFzZS5weQ==) | `96.59% <100.00%> (+0.67%)` | :arrow_up: | | [pysindy/feature\_library/custom\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvY3VzdG9tX2xpYnJhcnkucHk=) | `100.00% <100.00%> (ø)` | | | [pysindy/feature\_library/fourier\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvZm91cmllcl9saWJyYXJ5LnB5) | `100.00% <100.00%> (ø)` | | | [pysindy/feature\_library/generalized\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvZ2VuZXJhbGl6ZWRfbGlicmFyeS5weQ==) | `97.29% <100.00%> (-0.05%)` | :arrow_down: | | [pysindy/feature\_library/pde\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvcGRlX2xpYnJhcnkucHk=) | `95.48% <100.00%> (-0.06%)` | :arrow_down: | | [pysindy/feature\_library/sindy\_pi\_library.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9mZWF0dXJlX2xpYnJhcnkvc2luZHlfcGlfbGlicmFyeS5weQ==) | `96.03% <100.00%> (+0.71%)` | :arrow_up: | | ... and [2 more](https://app.codecov.io/gh/dynamicslab/pysindy/pull/354?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Jacob-Stevens-Haas commented 1 year ago

I would consider this a green CI. It bumps overall coverage, but because it's mostly a code deletion PR, the patch only hits 93.3% instead of 93.9%.

I'll merge it in a couple days unless someone says that they want to review it, since it's mostly just removing deprectation .