sporco.admm.cmod

ADMM algorithm for the CMOD problem

Functions

getPcn(zm)

Construct constraint set projection function.

zeromean(v)

Subtract mean of each column of matrix.

normalise(v)

Normalise columns of matrix.

Classes

CnstrMOD(*args, **kwargs)

ADMM algorithm for a constrained variant of the Method of Optimal Directions (MOD) [20] problem, referred to here as Constrained MOD (CMOD).


Function Descriptions

sporco.admm.cmod.getPcn(zm)[source]

Construct constraint set projection function.

Parameters:
zmbool

Flag indicating whether the projection function should include column mean subtraction

Returns:
fnfunction

Constraint set projection function

sporco.admm.cmod.zeromean(v)[source]

Subtract mean of each column of matrix.

Parameters:
varray_like

Input dictionary array

Returns:
vzndarray

Dictionary array with column means subtracted

sporco.admm.cmod.normalise(v)[source]

Normalise columns of matrix.

Parameters:
varray_like

Array with columns to be normalised

Returns:
vnrmndarray

Normalised array


Class Descriptions

class sporco.admm.cmod.CnstrMOD(*args, **kwargs)[source]

Bases: ADMMEqual

ADMM algorithm for a constrained variant of the Method of Optimal Directions (MOD) [20] problem, referred to here as Constrained MOD (CMOD).


Inheritance diagram of CnstrMOD


Solve the optimisation problem

\[\mathrm{argmin}_D \| D X - S \|_2^2 \quad \text{such that} \quad \| \mathbf{d}_m \|_2 = 1 \;\;,\]

where \(\mathbf{d}_m\) is column \(m\) of matrix \(D\), via the ADMM problem

\[\mathrm{argmin}_D \| D X - S \|_2^2 + \iota_C(G) \quad \text{such that} \quad D = G \;\;,\]

where \(\iota_C(\cdot)\) is the indicator function of feasible set \(C\) consisting of matrices with unit-norm columns.

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

DFid : Value of data fidelity term \((1/2) \| D X - S \|_2^2\)

Cnstr : Constraint violation measure

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

Time : Cumulative run time


Call graph

../_images/cmod_init.svg

Parameters:
Zarray_like, shape (M, K)

Sparse representation coefficient matrix

Sarray_like, shape (N, K)

Signal vector or matrix

dsztuple

Dictionary size

optCnstrMOD.Options object

Algorithm options

class Options(opt=None)[source]

Bases: Options

CnstrMOD algorithm options

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

AuxVarObj : Flag indicating whether the objective function should be evaluated using variable X (False) or Y (True) as its argument. Setting this flag to True often gives a better estimate of the objective function

ZeroMean : Flag indicating whether the solution dictionary \(D\) should have zero-mean components.

Parameters:
optdict or None, optional (default None)

CnstrMOD algorithm options

defaults = {'AbsStopTol': 0.0, 'AutoRho': {'AutoScaling': False, 'Enabled': True, 'Period': 10, 'RsdlRatio': 10.0, 'RsdlTarget': None, 'Scaling': 2.0, 'StdResiduals': False}, 'AuxVarObj': True, 'Callback': None, 'DataType': None, 'FastSolve': False, 'IterTimer': 'solve', 'MaxMainIter': 1000, 'RelStopTol': 0.001, 'RelaxParam': 1.8, 'ReturnX': False, 'StatusHeader': True, 'U0': None, 'Verbose': False, 'Y0': None, 'ZeroMean': False, 'fEvalX': False, 'gEvalY': True, 'rho': None}

Default content and allowed dict keys

itstat_fields_objfn = ('DFid', 'Cnstr')

Fields in IterationStats associated with the objective function; see eval_objfn

hdrtxt_objfn = ('DFid', 'Cnstr')

Display column headers associated with the objective function; see eval_objfn

hdrval_objfun = {'Cnstr': 'Cnstr', 'DFid': 'DFid'}

Dictionary mapping display column headers in hdrtxt_objfn to IterationStats entries

uinit(ushape)[source]

Return initialiser for working variable U

setcoef(Z)[source]

Set coefficient array.

getdict()[source]

Get final dictionary.

xstep()[source]

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

ystep()[source]

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

eval_objfn()[source]

Compute components of objective function as well as total contribution to objective function.

obfn_dfd()[source]

Compute data fidelity term \((1/2) \| D \mathbf{x} - \mathbf{s} \|_2^2\).

obfn_cns()[source]

Compute constraint violation measure \(\| P(\mathbf{y}) - \mathbf{y}\|_2\).

rhochange()[source]

Re-factorise matrix when rho changes

solve()

Call graph

../_images/cmod_solve.svg