GCV#

class cherab.inversion.GCV(*args, **kwargs)Source#

Bases: _SVDBase

Generalized Cross-Validation (GCV) criterion for regularization parameter optimization.

Note

The theory and implementation of GCV criterion can be seen here.

Parameters:
*args, **kwargs

Parameters are the same as _SVDBase.

Examples

>>> gcv = GCV(s, U, basis, data=data)

Methods

eta(beta)

Calculate squared regularization norm \(\eta\).

eta_diff(beta)

Calculate differential of \(\eta\).

filter(beta)

Calculate the filter factors \(f_{\lambda, i}\).

gcv(beta)

Calculate of GCV criterion function.

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

Plotting GCV as a function of the regularization parameter in log-log scale.

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

B

Matrix \(\mathbf{B}\) from \(\mathbf{Q} = \mathbf{B}^\mathsf{T}\mathbf{B}\).

U

Left singular vectors \(\mathbf{U}\).

basis

Inverted solution basis \(\tilde{\mathbf{V}}\).

bounds

Bound of log10 of regularization parameter \(\lambda\).

data

Given data for inversion calculation \(\mathbf{b}\).

lambda_opt

Optimal regularization parameter defined after solve is executed.

s

Singular values \(\mathbf{s}\).