residual()

residual()#

SolverTemplate.residual(Ohat: ndarray) ndarray[source]#

Compute the residual of the \(2\)-norm regression objective for each row of the given operator matrix.

Specifically, given a potential \(\Ohat\), compute

\[\|\D\ohat_i - \z_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.