cherab.phix.inversion.lcurve.Lcurve#

class cherab.phix.inversion.lcurve.Lcurve(*args, **kwargs)Source#

Bases: _SVDBase

L-curve criterion optimization for regularization parameter.

L curve is the trajectory of the point \((\log||Ax_\lambda-b||, \log||L(x_\lambda-x_0)||)\), those of which mean the residual and the regularization norm, respectively. The “corner” of this curve is assosiated with optimized point of regularization parameter, where the curvature of the L curve is maximized. This theory is mentioned by P.C.Hansen [1].

Parameters:
  • s (vector_like) – singular values of \(A\) like \(\sigma = (\sigma_1, \sigma_2, ...) \in \mathbb{R}^r\)

  • u (array_like) – left singular vectors of \(A\) like \(U = (u_1, u_2, ...) \in \mathbb{R}^{m\times r}\)

  • basis (array_like) – inverted solution basis \(\tilde{V} \in \mathbb{R}^{n\times r}\). Here, \(\tilde{V} = L^{-1}V\), where \(V\in\mathbb{R}^{n\times r}\) is the right singular vectors of \(A\) and \(L^{-1}\) is the inverse of regularization operator \(L \in \mathbb{R}^{n\times n}\).

  • **kwargs (_SVDBase properties, optional) – kwargs are used to specify properties like a data

References

Methods

curvature(beta)

Calculate L-curve curvature.

eta(beta)

Calculate squared regularization norm: \(\eta = ||Lx_\lambda||^2\)

eta_diff(beta)

Calculate differential of eta: \(\eta' = \frac{d\eta}{d\lambda}\)

inverted_solution(beta)

Calculate the inverted solution using SVD components at given regularization parameter.

optimize([itemax, bounds])

Excute the optimization of L-curve regularization.

plot_L_curve([fig, axes, bounds, n_beta, ...])

Plotting the L curve in log-log scale.

plot_curvature([fig, axes, bounds, n_beta])

Plotting L-curve curvature vs regularization parameters.

regularization_norm(beta)

Return the residual norm: \(\sqrt{\eta} = ||L x_\lambda||\)

residual_norm(beta)

Return the residual norm: \(\sqrt{\rho} = ||Ax_\lambda - b||\)

rho(beta)

Calculate squared residual norm: \(\rho = ||Ax_\lambda - b||^2\).

solve([bounds, stepsize])

Solve the ill-posed inversion equation.

w(beta)

Calculate window function using regularization parameter \(\lambda\).

Attributes

basis

The inverted solution basis \(\tilde{V} \in \mathbb{R}^{n\times r}\).

data

Given data for inversion calculation.

lambda_opt

Optimal regularization parameter defined after solve is executed.

s

Singular values of \(A\)

u

Left singular vectors of \(A\).