bartorch.optim.IRGNM

bartorch.optim.IRGNM#

class bartorch.optim.IRGNM(*, iterations=8, alpha=1.0, alpha_min=0.0, alpha_min0=0.0, redu=2.0, cg_maxiter=30, cg_tol=0.0, inner=None)#

Iteratively regularized Gauss-Newton for F(x) = y.

Each step linearizes at the current point and solves

min_u ||DF u - r||^2 + alpha ||u||^2 + R(u)

where r is the residual carried to the linearization; the weight is then divided by redu, down to alpha_min. R is whatever the inner solver regularizes with, and is nothing at all for conjugate gradients.

Parameters:
  • iterations (int) – Gauss-Newton steps.

  • alpha (float) – Initial Tikhonov weight.

  • alpha_min (float) – What the weight decays towards.

  • alpha_min0 (float) – A floor the decayed weight is never taken below. Only the second form has it; BART’s irgnm does not.

  • redu (float) – Factor the weight is divided by after each step.

  • cg_maxiter (int) – Conjugate-gradient iterations per step, for the built-in solver.

  • cg_tol (float) – Conjugate-gradient tolerance per step, for the built-in solver.

  • inner (str, solver or None) – The solver for the linearized problem. None runs BART’s first form, entirely inside the library, which is what nlinv runs. Anything else runs the second form: "cg", "ist", "fista", "admm", "pridu", or a configured solver from bartorch.optim, whose regularizers become the R above.

Examples

Plain, which is nlinv:

>>> IRGNM(iterations=8)(kspace, F, x0=start)

Wavelet-regularized, which is what moba -l1 runs:

>>> IRGNM(inner=optim.FISTA(prox.Wavelet(0.001), maxiter=30))(kspace, F, x0=start)

Several terms at once, which is ADMM’s job:

>>> IRGNM(inner=optim.ADMM([prox.Wavelet(0.001), prox.TotalVariation(0.01)]))(
...     kspace, F, x0=start
... )

Notes

The two forms are the same method and not the same arithmetic. The first carries alpha (xref - x) into the right-hand side and solves for a step; the second shifts by xref, carries an extra DF (x - xref) into the residual, and solves for the iterate itself. They agree in exact arithmetic and differ in the last bits, so a run with inner= will not reproduce one without it – but inner="cg" reproduces iter4_irgnm2 exactly, which is what the suite holds it to.

__init__(*, iterations=8, alpha=1.0, alpha_min=0.0, alpha_min0=0.0, redu=2.0, cg_maxiter=30, cg_tol=0.0, inner=None)#

Methods

__init__(*[, iterations, alpha, alpha_min, ...])

in_library(y, F, x0[, xref])

BART's second form with its own conjugate gradients, iter4_irgnm2.