Classes for ADMM algorithms for $$\ell_1$$ spline optimisation

Classes

 SplineL1(S, lmbda[, opt, axes]) ADMM algorithm for the $$\ell_1$$-spline problem for equi-spaced samples [16], [31].

## Class Descriptions¶

class sporco.admm.spline.SplineL1(S, lmbda, opt=None, axes=(0, 1))[source]

ADMM algorithm for the $$\ell_1$$-spline problem for equi-spaced samples [16], [31].

Solve the optimisation problem

$\mathrm{argmin}_\mathbf{x} \; \| W(\mathbf{x} - \mathbf{s}) \|_1 + \frac{\lambda}{2} \; \| D \mathbf{x} \|_2^2 \;\;,$

where $$D = \left( \begin{array}{ccc} -1 & 1 & & & \\ 1 & -2 & 1 & & \\ & \ddots & \ddots & \ddots & \\ & & 1 & -2 & 1 \\ & & & 1 & -1 \end{array} \right)\;$$, via the ADMM problem

$\mathrm{argmin}_{\mathbf{x}, \mathbf{y}} \; \| W \mathbf{y} \|_1 + \frac{\lambda}{2} \; \| D \mathbf{x} \|_2^2 \;\; \text{such that} \;\; \mathbf{x} - \mathbf{y} = \mathbf{s} \;\;.$

After termination of the solve method, attribute itstat is a list of tuples representing statistics of each iteration. The fields of the named tuple IterationStats are:

Iter : Iteration number

ObjFun : Objective function value

DFid : Value of data fidelity term $$\| W (\mathbf{x} - \mathbf{s}) \|_1$$

Reg : Value of regularisation term $$\frac{1}{2} \| D \mathbf{x} \|_2^2$$

PrimalRsdl : Norm of primal residual

DualRsdl : Norm of dual residual

EpsPrimal : Primal residual stopping tolerance $$\epsilon_{\mathrm{pri}}$$

EpsDual : Dual residual stopping tolerance $$\epsilon_{\mathrm{dua}}$$

Rho : Penalty parameter

XSlvRelRes : Relative residual of X step solver

Time : Cumulative run time

Parameters: S : array_like Signal vector or matrix lmbda : float Regularisation parameter opt : SplineL1.Options object Algorithm options axes : tuple or list Axes on which spline regularisation is to be applied
class Options(opt=None)[source]

Bases: sporco.admm.admm.Options

SplineL1 algorithm options

Options include all of those defined in sporco.admm.admm.ADMM.Options, together with additional options:

gEvalY : Flag indicating whether the $$g$$ component of the objective function should be evaluated using variable Y (True) or X (False) as its argument.

DFidWeight : Data fidelity weight matrix.

LinSolveCheck : If True, compute relative residual of X step solver.

Parameters: opt : dict or None, optional (default None) SplineL1 algorithm options
uinit(ushape)[source]

Return initialiser for working variable U.

xstep()[source]

Minimise Augmented Lagrangian with respect to $$\mathbf{x}$$.

ystep()[source]

Minimise Augmented Lagrangian with respect to $$\mathbf{y}$$.

rhochange()[source]

Action to be taken when rho parameter is changed.

obfn_gvar()[source]

Variable to be evaluated in computing regularisation term, depending on ‘gEvalY’ option value.

eval_objfn()[source]

Compute components of objective function as well as total contribution to objective function. Data fidelity term is $$(1/2) \| \mathbf{x} - \mathbf{s} \|_2^2$$ and regularisation term is $$\| D \mathbf{x} \|_2^2$$.

itstat_extra()[source]

Non-standard entries for the iteration stats record tuple.

cnst_A(X)[source]

Compute $$A \mathbf{x}$$ component of ADMM problem constraint. In this case $$A \mathbf{x} = \mathbf{x}$$.

cnst_AT(X)[source]

Compute $$A^T \mathbf{x}$$ where $$A \mathbf{x}$$ is a component of ADMM problem constraint. In this case $$A^T \mathbf{x} = \mathbf{x}$$.

cnst_B(Y)[source]

Compute $$B \mathbf{y}$$ component of ADMM problem constraint. In this case $$B \mathbf{y} = -\mathbf{y}$$.

cnst_c()[source]

Compute constant component $$\mathbf{c}$$ of ADMM problem constraint. In this case $$\mathbf{c} = \mathbf{s}$$.