regresidual()#
- L2Solver.regresidual(Ohat: ndarray) ndarray [source]#
Compute the residual of the regularized regression objective for each row of the given operator matrix.
Specifically, given a potential \(\Ohat\), compute
\[\|\D\ohat_i - \z_i\|_2^2 + \|\lambda\ohat_i\|_2^2, \quad i = 1, \ldots, r,\]where \(\ohat_i\) and \(\z_i\) are the \(i\)-th rows of \(\Ohat\) and \(\Z\), respectively.
- Parameters:
- Ohat(r, d) ndarray
Operator matrix \(\Ohat\).
- Returns:
- residuals(r,) ndarray
\(2\)-norm residuals for each row of the operator matrix.