opinf.lstsq#

Solvers for Operator Inference least-squares problems.

Introduction#

The following least-squares regression problem is at the heart of Operator Inference:

\[\begin{split}\min_{ \chat, \Ahat, \Hhat, \Bhat} \sum_{j=0}^{k-1}\left\| \chat + \Ahat\qhat_{j} + \Hhat[ \qhat_{j}\otimes\qhat_{j}] + \Bhat\u_{j} - \dot{\qhat}_{j} \right\|_{2}^{2} \\ = \min_{\Ohat}\left\| \D\Ohat\trp - \mathbf{Y}\trp \right\|_{F}^{2},\end{split}\]

where

  • \(\qhat_{j}\) is a low-dimensional representation of the state at time \(t_{j}\),

  • \(\dot{\qhat}_{j}\) is the time derivative of the low-dimensional state at time \(t_{j}\),

  • \(\u_{j} = \u(t_{j})\) is the input at time \(t_{j}\),

  • \(\D\) is the data matrix containing low-dimensional state data,

  • \(\Ohat\) is the operator matrix of unknown operators to be inferred, and

  • \(\mathbf{Y}\) is the matrix of low-dimensional time derivative data.

This module defines least-squares solver classes for solving the above regression problem. These classes should be instantiated before being passed to the fit() method of a ROM class using the solver keyword argument. In addition, the following function calculates the column dimension of \(\Ohat\) and \(\D\).

lstsq_size

Calculate the number of columns in the operator matrix O in the Operator Inference least-squares problem.

Default Solver#

If solver is not specified, the default is to use the following class.

PlainSolver

Solve the l2-norm ordinary least-squares problem without any regularization, i.e.,

Tikhonov Regularization#

It is often helpful to add a regularization term \(\mathcal{R}(\Ohat)\) to the least-squares objective function in order to penalize the entries of the learned operators. This promotes stability and accuracy in the learned reduced-order model by preventing overfitting. The problem stated above then becomes

\[\min_{\Ohat}\left\| \D\Ohat\trp - \mathbf{Y}\trp \right\|_{F}^{2} + \mathcal{R}(\Ohat).\]

The following classes solve the above problem with different choices of \(\mathcal{R}(\Ohat)\).

L2Solver

Solve the l2-norm ordinary least-squares problem with L2 regularization:

L2SolverDecoupled

Solve r independent l2-norm ordinary least-squares problems, each with the same data matrix A but different L2 regularizations λ_i > 0 for the columns of X and B:

TikhonovSolver

Solve the l2-norm ordinary least-squares problem with Tikhonov regularization:

TikhonovSolverDecoupled

Solve r independent l2-norm ordinary least-squares problems, each with the same data matrix but a different Tikhonov regularizer,

Total Least-Squares Solver#

If you want to use the total least-squares solver use the following class.

TotalLeastSquaresSolver

Solve the total least-squares problem without any regularization, i.e.,