SolverTemplate#
- class SolverTemplate[source]#
Template for solvers for the Operator Inference regression \(\Z \approx \Ohat\D\trp\) (or \(\D\Ohat\trp \approx \Z\trp\)) for the operator matrix \(\Ohat\).
Child classes formulate the regression, which may include regularization terms and/or optimization constraints. Hyperparameters should be set in the constructor (regularization terms, etc.).
Properties:- d#
Number of unknowns in each row of the operator matrix (number of columns of \(\D\) and \(\Ohat\)).
- data_matrix#
\(k \times d\) data matrix \(\D\).
- k#
Number of equations in the least-squares problem (number of rows of \(\D\) and number of columns of \(\Z\)).
- lhs_matrix#
\(r \times k\) left-hand side data \(\Z\).
- r#
Number of operator matrix rows to learn (number of rows of \(\Z\) and \(\Ohat\))
Methods:Compute the \(2\)-norm condition number of the data matrix \(\D\).
Make a copy of the solver.
Verify dimensions and save the data matrices.
Load a serialized solver from an HDF5 file, created previously from the
save()
method.Compute the residual of the \(2\)-norm regression objective for each row of the given operator matrix.
Serialize the solver, saving it in HDF5 format.
Solve the Operator Inference regression.
Verify the solver.