Skip to content

Conversation

@nicolearetz
Copy link
Contributor

  • 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

nicolearetz and others added 28 commits September 2, 2025 15:47
Copy link
Member

@shanemcq18 shanemcq18 left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this.

"""Compute the residual of the regularized regression problem."""
raise NotImplementedError # pragma: no cover

def add_initial_guess(self, Ohat):
Copy link
Member

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()
Copy link
Member

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):
Copy link
Member

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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably needs a docstring

@shanemcq18
Copy link
Member

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: test_initial_guesses() in tests\lstsq\test_tikhonov.py fails either on some systems or on some random draws when n_dofs = 1. Still investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants