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

Extract common functionality from SINDy to _BaseSINDy #562

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Jacob-Stevens-Haas
Copy link
Collaborator

@Jacob-Stevens-Haas Jacob-Stevens-Haas commented Sep 24, 2024

Begin #351

This pull request begins the abstraction of the SINDy class, which handles a lot of methods with special cases, to a variety of classes that reflect fundamental differences between problem formulations. Here, I pull out _BaseSINDy, which contains basic information about the feature library, system dimension, and printing the equations.

Future PRs will make Weak and discrete their own classes, modify feature libraries to be amenable to jax, numpy, and cvxpy arrays, and introduce the Single-Step SINDy class and associated optimizer/problem setup.

This will eventually enable SSSindy.print, as well as a simpler discrete and
SINDyPI class
SINDy.equations(), equations(), print_model() were written with extra generality
that never ended up being used.  This commit removes such generality and
throws away these indirected helper functions in favor of a single method.
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

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

Project coverage is 95.33%. Comparing base (23da590) to head (2b3871b).

Files with missing lines Patch % Lines
pysindy/pysindy.py 91.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #562      +/-   ##
==========================================
+ Coverage   95.30%   95.33%   +0.02%     
==========================================
  Files          37       37              
  Lines        4046     4048       +2     
==========================================
+ Hits         3856     3859       +3     
+ Misses        190      189       -1     
Flag Coverage Δ
95.33% <91.22%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Also:
* fix sphinx cross-linking error
* remove unused print_model
@Jacob-Stevens-Haas
Copy link
Collaborator Author

Hey Alan, I put you as a reviewer in case you want an eye into this process. This is the beginning of what we talked about in the last meeting.

@AHsu98, @MalachiteWind, I'm going to add you as collaborators so you can review these changes too.

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

Successfully merging this pull request may close these issues.

1 participant