residual()#

L2SolverDecoupled.residual(X)[source]#

Calculate the residual of the regularized problem for each column of B = [ b_1 | … | b_r ], i.e., ||Ax_i - b_i||_2^2 + ||λ_i x_i||_2^2.

Parameters
X(d, r) ndarray

Least-squares solution X = [ x_1 | … | x_r ]; each column is the solution to the subproblem with the corresponding column of B.

Returns
resids(r,) ndarray

Residuals ||Ax_i - b_i||_2^2 + ||λ_i x_i||_2^2, i = 1, …, r.