Lcurve#
- class cherab.inversion.Lcurve(*args, **kwargs)Source#
Bases:
_SVDBaseL-curve criterion for regularization parameter optimization.
The L-curve is a log-log plot of the residual norm versus the regularization norm. The L-curve criterion for tikhnov regularization gives the optimal regularization parameter \(\lambda\) as the corner point of the L-curve by maximizing the curvature of the L-curve.
Note
The theory and implementation of the L-curve criterion are described here.
- Parameters:
- *args, **kwargs
Parameters are the same as
_SVDBase.
Examples
>>> lcurve = Lcurve(s, U, basis, data=data)
Methods
curvature(beta)Calculate L-curve curvature.
eta(beta)Calculate squared regularization norm \(\eta\).
eta_diff(beta)Calculate differential of \(\eta\).
filter(beta)Calculate the filter factors \(f_{\lambda, i}\).
plot_L_curve([fig, axes, bounds, n_beta, ...])Plotting the L-curve in log-log scale.
plot_curvature([fig, axes, bounds, n_beta, ...])Plotting the curvature of L-curve as function of regularization parameter.
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}\).