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
ris the residual carried to the linearization; the weight is then divided byredu, down toalpha_min.Ris 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
irgnmdoes 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.
Noneruns BART’s first form, entirely inside the library, which is whatnlinvruns. Anything else runs the second form:"cg","ist","fista","admm","pridu", or a configured solver frombartorch.optim, whose regularizers become theRabove.
Examples
Plain, which is
nlinv:>>> IRGNM(iterations=8)(kspace, F, x0=start)
Wavelet-regularized, which is what
moba -l1runs:>>> 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 byxref, carries an extraDF (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 withinner=will not reproduce one without it – butinner="cg"reproducesiter4_irgnm2exactly, 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.