regpy.solvers.linear.tikhonov

Classes

TikhonovCG

The Tikhonov method for linear inverse problems. Minimizes

TikhonovAlphaGrid

Class runnning Tikhonov regularization on a grid of different regularization parameters.

NonstationaryIteratedTikhonov

Iterated Tikhonov regularization with a given (fixed) sequence of regularization parameters.

Module Contents

class regpy.solvers.linear.tikhonov.TikhonovCG(setting: regpy.solvers.general.Setting, data=None, regpar: float | None = None, xref=None, x0=None, tol: float | None = None, reltolx: float | None = 0.01, reltoly: float | None = None, all_tol_criteria: bool = True, max_it: int = 1000, krylov_basis: list | None = None, preconditioner: regpy.operators.Operator | None = None, logging_level: str = 'INFO', update_setting: bool = True, x_exact=None, y_exact=None)[source]

Bases: regpy.solvers.general.RegSolver

The Tikhonov method for linear inverse problems. Minimizes

\[\Vert T x - data\Vert^2 + regpar * \Vert x - xref\Vert^2\]

using a conjugate gradient method. To determine a stopping index yielding guaranteed error bounds, a partial embedded minimal residual method (MR) is used, which can be implemented by updating a scalar parameter in each iteration. For details on the use of the embedded MR method, as proposed by H. Egger in “Numerical realization of Tikhonov regularization: appropriate norms, implementable stopping criteria, and optimal algorithms” in Oberwolfach Reports 9/4, page 3009-3010, 2013; see also the Master thesis by Andrea Dietrich “Analytische und numerische Untersuchung eines Abbruchkriteriums für das CG-Verfahren zur Minimierung von Tikhonov Funktionalen”, Univ. Göttingen, 2017

Parameters:
  • setting (regpy.solvers.Setting) – The setting of the forward problem. Must have quadratic penalty and data fidelity terms.

  • data (setting.op.codomain, optional) – The measured data. Default None means that the data from setting is used.

  • regpar (float|None, optional) – The regularization parameter. Must a positive of None. If None, then the regularization parameter is taken from the setting, which must be Tikhonov.

  • xref (setting.op.domain or None, optional) – Reference value in the Tikhonov functional. If None, it is taken from the setting.

  • update_setting (bool, optional) – Flag wheather or not values for data, regpar, and xref that are provided explicitly should be updated in the setting. If the setting does not have a regularization parameter, no regularization parameter will be set in the setting. Defaults to True.

  • x0 (setting.op.domain or None, optional) – Starting value of the CG iteration. If None (default), setting.op.domain.zeros() is used as starting value.

  • tol (float or None, default: None) – The absolute tolerance - it guarantees that difference of the final CG iterate to the exact minimizer of the Tikhonov functional in setting.h_domain.norm is smaller than tol. If None, this criterion is not active (analogously for reltolx and reltoly). If the noise level is given, it is reasonable value to choose tol in the order of the propagated data noise level, which is noiselevel/2*sqrt(regpar)

  • reltolx (float or None, default: 1e-2) – Relative tolerance in domain. Guarantees that the relative error w.r.t. setting.h_domain.norm is smaller than reltolx. The motivation for the default value is similar to that given for tol, assuming a reasonable signal-to-noise ratio for the Tikhonov minimizer.

  • reltoly (float or None, default: None) – Relative tolerance in codomain.

  • all_tol_criteria (bool (default: True)) – If True, the iteration is stopped if all specified tolerance criteria are satisfied. If False, the iteration is stopped if one criterion is satisfied.

  • krylov_basis (list or None, optional) – Defaults to None. Otherwise, an orthonormal basies of the Krylov subspace is computed while running CG solver

  • preconditioner (Preconditioner such that the iteration is done on) – \(\Vert TP x - data\Vert^2 + regpar * \Vert Px - xref\Vert^2\) The iterates (self.x) still solve the original equation without preconditioner.

  • x_exact (setting.op.domain or None, optional)

  • y_exact (setting.op.codomain or None, optional) – These parameters are intended for monitoring convergence of the CG iteration and the performance of the stopping rules. If not None (default), they should be (an approximation of) the exact minimizer of the Tikhonov functional and its image under setting.op. In this case, the internal stopping rules track the errors in the domain and/or codomain.

class KappaTrackAndMinIt(min_it=0, logging_level='INFO')[source]

Bases: StopRule

Stopping rule which tracks the value of kappa and ensures a minimum number of iterations if a Krylov basis must be computed.

min_it = 0
it = 0
class RelTolXStop(tol: float = 0.0, logging_level='INFO', x_exact=None)[source]

Bases: StopRule

Stopping rule based on relative error in the domain of the operator.

x_exact = None
class RelTolYStop(tol: float = 0.0, logging_level='INFO', y_exact=None)[source]

Bases: StopRule

Stopping rule based on relative error in the domain of the operator.

y_exact = None
first_step = True
class TolStop(tol: float = 0.0, logging_level='INFO', x_exact=None)[source]

Bases: StopRule

Stopping rule based on absolute tolerance

tol = 0.0
x_exact = None
x

The zero-th CG iterate.

regpar = None

The regularization parameter.

hessR
y

The image of the current iterate under the operator.

hessS
g_res

The gram matrix applied to the residual of the normal equation. g_res = T^* G_Y (data-T self.x) + regpar G_X(xref-self.x) in each iteration with operator T and Gram matrices G_x, G_Y.

sq_norm_res

The squared norm of the residual.

dir

The direction of descent.

kappa = 1

ratio of the squared norms of the residuals of the CG method and the MR-method. Used for error estimation.

x_exact = None
y_exact = None
krylov_basis = None
get_stoprule(other_stuprule=None)[source]

Constructs the internal StopRule defined by the parameters of the constructor

run(stoprule=None)[source]

Runs the method with the stoprule specified by the parameters of the constructor.

Parameters: stoprule: StopRule, optional

Defaults to None. Otherwise, the given StopRule is (or-) combined with the internal StopRule.

get_convergence_histories()[source]

Yields the stoprule specified by the parameters of the constructor

primal()[source]
static check_applicability(setting, op_norm=None) tuple[dict, dict][source]
class regpy.solvers.linear.tikhonov.TikhonovAlphaGrid(setting: regpy.solvers.general.Setting, data, alphas, xref=None, max_CG_iter=1000, delta=None, tol_fac: float = 0.5, logging_level: str = 'INFO')[source]

Bases: regpy.solvers.general.RegSolver

Class runnning Tikhonov regularization on a grid of different regularization parameters. This allows to choose the regularization parameter by some stopping rule. Tikhonov functionals are minimized by an inner CG iteration.

Parameters:
  • setting (regpy.solvers.Setting) – The setting of the forward problem.

  • data (array-like) – The right hand side.

  • alphas (Either an iterable giving the grid of alphas or a tuple (alpha0,q)) – In the latter case the seuqence \((alpha0*q^n)_{n=0,1,2,...}\) is generated.

  • max_CG_iter (integer, default 1000.) – maximum number of CG iterations.

  • xref (array-like, default None) – initial guess in Tikhonov functional. Default corresponds to zeros()

  • float (delta =) – data noise level

  • None (default) – data noise level

  • tol_fac (float, default 0.5) – absolute tolerance for CG iterations is tol_fac*delta/sqrt(alpha)

Notes

Further keyword arguments for TikhonovCG can be given.

data

Right hand side of the operator equation.

xref = None

initial guess in Tikhonov functional.

max_CG_iter = 1000

maximum number of CG iterations.

delta = None

data noise level.

tol_fac = 0.5

absolute tolerance for CG iterations is tol_fac*delta/sqrt(alpha) if delta is specfied, otherwise relative tolerance in domain is tol_fac/sqrt(alpha)

logging_level = 'INFO'

logging level for CG iteration.

class regpy.solvers.linear.tikhonov.NonstationaryIteratedTikhonov(setting, data, alphas, xref=None, max_CG_iter=1000, delta=None, tol_fac=0.5, logging_level='INFO')[source]

Bases: regpy.solvers.general.RegSolver

Iterated Tikhonov regularization with a given (fixed) sequence of regularization parameters.

Tikhonov functionals are minimized by an inner CG iteration.

Parameters:
  • setting (regpy.solvers.Setting) – The setting of the forward problem.

  • data (array-like) – The right hand side.

  • alphas (Either an iterable giving the grid of alphas or a tuple (alpha0,q)) – In the latter case the seuqence \((alpha0*q^n)_{n=0,1,2,...}\) is generated.

  • xref (array-like, default None) – initial guess in Tikhonov functional. Default corresponds to zeros()

  • float (delta =) – data noise level

  • None (default) – data noise level

  • tol_fac (float, default 0.5) – absolute tolerance for CG iterations is tol_fac*delta/sqrt(alpha)

data

Right hand side of the operator equation.

xref = None

initial guess in Tikhonov functional.

max_CG_iter = 1000

maximum number of CG iterations.

delta = None

data noise level.

tol_fac = 0.5

absolute tolerance for CG iterations is tol_fac*delta/sqrt(alpha) if delta is specfied, otherwise relative tolerance in domain is tol_fac/sqrt(alpha)

logging_level = 'INFO'

logging level for CG iteration.

alpha_eff = inf

effective regularization parameter. 1/alpha_eff is the sum of the reciprocals of the previous alpha’s