_SVDBase#
- class cherab.inversion.core._SVDBase(s, U, basis, B=None, *, data=None)Source#
Bases:
objectBase class for inversion calculation based on Singular Value Decomposition (SVD) method.
Note
The implementation of this class is based on the inversion theory.
Note
This class is designed to be inherited by subclasses which define the objective function to optimize the regularization parameter \(\lambda\) using the
basinhoppingfunction.- Parameters:
- s(
r, ) array_like Singular values like \(\mathbf{s} = (\sigma_1, \sigma_2, ...) \in \mathbb{R}^r\).
- U(
M,r) array_like Left singular vectors like \(\mathbf{U}\in\mathbb{R}^{M\times r}\).
- basis(
N,r) array_like Inverted solution basis like \(\tilde{\mathbf{V}} \in \mathbb{R}^{N\times r}\).
- B(
M,M) array_like Matrix \(\mathbf{B}\) coming from \(\mathbf{Q} = \mathbf{B}^\mathsf{T}\mathbf{B}\), by default None, i.e. \(\mathbf{B} = \mathbf{I}\).
- data(
M, ) array_like Given data as a vector \(\mathbf{b}\in\mathbb{R}^M\), by default None.
- s(
Methods
eta(beta)Calculate squared regularization norm \(\eta\).
eta_diff(beta)Calculate differential of \(\eta\).
filter(beta)Calculate the filter factors \(f_{\lambda, i}\).
regularization_norm(beta)Return the regularization norm: \(\sqrt{\eta} = \|\mathbf{x}_\lambda\|_\mathbf{H}\).
residual_norm(beta)Return the residual norm: \(\sqrt{\rho} = \|\mathbf{T}\mathbf{x}_\lambda - \mathbf{b}\|_{\mathbf{Q}}\).
rho(beta)Calculate squared residual norm \(\rho\).
solution(beta)Calculate the solution vector \(\mathbf{x}_\lambda\).
solve([bounds, stepsize])Solve the ill-posed inversion equation.
Attributes
Matrix \(\mathbf{B}\) from \(\mathbf{Q} = \mathbf{B}^\mathsf{T}\mathbf{B}\).
Left singular vectors \(\mathbf{U}\).
Inverted solution basis \(\tilde{\mathbf{V}}\).
Bound of log10 of regularization parameter \(\lambda\).
Given data for inversion calculation \(\mathbf{b}\).
Optimal regularization parameter defined after
solveis executed.Singular values \(\mathbf{s}\).