sporco.dictlrn.bpdndl

Dictionary learning based on BPDN sparse coding

Classes

BPDNDictLearn(D0, S[, lmbda, opt]) Dictionary learning based on BPDN and CnstrMOD

Class Descriptions

class sporco.dictlrn.bpdndl.BPDNDictLearn(D0, S, lmbda=None, opt=None)[source]

Bases: sporco.dictlrn.dictlrn.DictLearn

Dictionary learning based on BPDN and CnstrMOD


Inheritance diagram of BPDNDictLearn


Solve the optimisation problem

\[\mathrm{argmin}_{D, X} \; (1/2) \| D X - S \|_F^2 + \lambda \| X \|_1 \quad \text{such that} \quad \|\mathbf{d}_m\|_2 = 1\]

via interleaved alternation between the ADMM steps of the admm.bpdn.BPDN and CnstrMOD problems.

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 \((1/2) \| D X - S \|_F^2\)

RegL1 : Value of regularisation term \(\| X \|_1\)

Cnstr : Constraint violation measure

XPrRsdl : Norm of X primal residual

XDlRsdl : Norm of X dual residual

XRho : X penalty parameter

DPrRsdl : Norm of D primal residual

DDlRsdl : Norm of D dual residual

DRho : D penalty parameter

Time : Cumulative run time


Call graph

../_images/bpdndl_init.svg

Parameters:
D0 : array_like, shape (N, M)

Initial dictionary matrix

S : array_like, shape (N, K)

Signal vector or matrix

lmbda : float

Regularisation parameter

opt : BPDNDictLearn.Options object

Algorithm options

class Options(opt=None)[source]

Bases: sporco.dictlrn.dictlrn.Options

BPDN dictionary learning algorithm options.

Options include all of those defined in sporco.dictlrn.dictlrn.DictLearn.Options, together with additional options:

AccurateDFid : Flag determining whether data fidelity term is estimated from the value computed in the X update (False) or is computed after every outer iteration over an X update and a D update (True), which is slower but more accurate.

BPDN : Options sporco.admm.bpdn.BPDN.Options

CMOD : Options sporco.admm.cmod.CnstrMOD.Options

Parameters:
opt : dict or None, optional (default None)

BPDNDictLearn algorithm options

evaluate()[source]

Evaluate functional value of previous iteration

solve()

Call graph

../_images/bpdndl_solve.svg