residual()#
- TikhonovSolver.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 + ||Px_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 or float (r = 1)
Residuals ||Ax_i - b_i||_2^2 + ||Px_i||_2^2, i = 1, …, r.