regresidual()

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-\ohat_i^{(0)})\|_2^2, \quad i = 1, \ldots, r,\]

where \(\ohat_i\) and \(\z_i\) are the \(i\)-th rows of \(\Ohat\) and \(\Z\), respectively, and \(\ohat_i^{(0)}\) are the rows of the initial guess set during initialization. If no initial guess was provided, \(\ohat_i^{(0)} = \bf0\)

Parameters:
Ohat(r, d) ndarray

Operator matrix \(\Ohat\).

Returns:
residuals(r,) ndarray

\(2\)-norm residuals for each row of the operator matrix.