-
Notifications
You must be signed in to change notification settings - Fork 33
regularization towards initial guess #88
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
base: main
Are you sure you want to change the base?
Conversation
nicolearetz
commented
Oct 29, 2025
- regularization towards an initial guess (defaults to zero if none is provided) + tests
- expansion of operators to larger or smaller basis + tests
- fixed bug in Gram Schmidt algorithm in the method of snapshots
- parameterized polynomial operators of arbitrary order
regularization
shanemcq18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also need to track down why some of the tests are failing on GitHub, stay tuned.
|
|
||
| For `basics.ipynb`, `inputs.ipynb`, `parametric.ipynb` no additional data generation or download is required. | ||
|
|
||
| For `nested.ipynb`: Download data at URL, or run the script `data_generation_for_nested.py`. No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this.
src/opinf/lstsq/_tikhonov.py
Outdated
| """Compute the residual of the regularized regression problem.""" | ||
| raise NotImplementedError # pragma: no cover | ||
|
|
||
| def add_initial_guess(self, Ohat): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hide these two functions slightly like _add_initial_guess() and _subtract_initial_guess()
|
|
||
| # Execute non-intrusive learning. | ||
| self._extract_operators(self.solver.solve()) | ||
| self._Ohat = self.solver.solve() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already implemented in the operator_matrix attribute, but not a big deal
| r=self.state_dimension, p=self.polynomial_order | ||
| ) | ||
|
|
||
| def restrict_to_subspace(self, indices_trial, indices_test=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a docstring for this?
| ) | ||
| ] | ||
|
|
||
| def extend_to_dimension( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs a docstring
|
I need to track down an issue with one of the tests, but before that, I was getting some failures on old versions of Python on my local machine that seem to be related to this issue: numpy/numpy#29820. This hopefully shouldn't be a problem for our tests, but it's messing me up locally. It's time to drop python 3.9, so that might help things a bit... Anyway, here's what actually needs to be fixed: |