sporco.admm.spline¶
Classes for ADMM algorithms for \(\ell_1\) spline optimisation
Classes
|
ADMM algorithm for the \(\ell_1\)-spline problem for equi-spaced samples [23], [45]. |
Class Descriptions¶
- class sporco.admm.spline.SplineL1(*args, **kwargs)[source]¶
Bases:
ADMM
ADMM algorithm for the \(\ell_1\)-spline problem for equi-spaced samples [23], [45].
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, attributeitstat
is a list of tuples representing statistics of each iteration. The fields of the named tupleIterationStats
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:
- Sarray_like
Signal vector or matrix
- lmbdafloat
Regularisation parameter
- optSplineL1.Options object
Algorithm options
- axestuple or list
Axes on which spline regularisation is to be applied
- class Options(opt=None)[source]¶
Bases:
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
: IfTrue
, compute relative residual of X step solver.
- Parameters:
- optdict or None, optional (default None)
SplineL1 algorithm options
- defaults = {'AbsStopTol': 0.0, 'AutoRho': {'AutoScaling': True, 'Enabled': True, 'Period': 1, 'RsdlRatio': 1.2, 'RsdlTarget': None, 'Scaling': 1000.0, 'StdResiduals': False}, 'Callback': None, 'DFidWeight': 1.0, 'DataType': None, 'FastSolve': False, 'IterTimer': 'solve', 'LinSolveCheck': False, 'MaxMainIter': 1000, 'RelStopTol': 0.001, 'RelaxParam': 1.8, 'StatusHeader': True, 'U0': None, 'Verbose': False, 'Y0': None, 'gEvalY': True, 'rho': None}¶
Default content and allowed dict keys
- itstat_fields_objfn = ('ObjFun', 'DFid', 'Reg')¶
Fields in IterationStats associated with the objective function; see
eval_objfn
- itstat_fields_extra = ('XSlvRelRes',)¶
Non-standard fields in IterationStats; see
itstat_extra
- hdrtxt_objfn = ('Fnc', 'DFid', 'Reg')¶
Display column headers associated with the objective function; see
eval_objfn
- hdrval_objfun = {'DFid': 'DFid', 'Fnc': 'ObjFun', 'Reg': 'Reg'}¶
Dictionary mapping display column headers in
hdrtxt_objfn
to IterationStats entries
- 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\).
- 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}\).