TikhonovSolver#
- class TikhonovSolver(regularizer, method='svd')[source]#
Solve the l2-norm ordinary least-squares problem with Tikhonov regularization:
sum_{i} min_{x_i} ||Ax_i - b_i||_2^2 + ||Px_i||_2^2, P > 0 (SPD).
or, written in the Frobenius norm,
min_{X} ||AX - B||_F^2 + ||PX||_F^2, P > 0 (SPD).
The problem is solved by taking the singular value decomposition of the augmented data matrix [A.T | P.T].T, which is equivalent to solving
- min_{X} || [A] _ [B] ||^{2}
|| [P] X [0] ||_{F}
or the Normal equations
(A.T A + P.T P) X = A.T B.
Properties
A
Left-hand side data matrix.
B
"Right-hand side matrix B = [ b_1 | .
d
Number of unknowns to learn in each problem (number of columns of A).
k
Number of equations in the least-squares problem (number of rows of A).
method
Strategy for solving the regularized least-squares problem.
r
Number of independent least-squares problems (number of columns of B).
regularizer
(d, d) ndarray: symmetric semi-positive-definite regularization matrix P.
Methods
Calculate the 2-norm condition number of the data matrix A.
Store A and B.
Calculate the data misfit (residual) of the non-regularized problem for each column of B = [ b_1 | .
Solve the least-squares problem.
Compute the 2-norm condition number of the regularized data matrix.
Calculate the residual of the regularized problem for each column of B = [ b_1 | .