sporco.dictlrn.bpdndl¶
Dictionary learning based on BPDN sparse coding
Classes
|
Dictionary learning based on BPDN and CnstrMOD |
Class Descriptions¶
- class sporco.dictlrn.bpdndl.BPDNDictLearn(*args, **kwargs)[source]¶
Bases:
sporco.dictlrn.dictlrn.DictLearn
Dictionary learning based on BPDN and CnstrMOD
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
andadmm.cmod.CnstrMOD
problems.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 \((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 timeCall graph
- Parameters
- D0array_like, shape (N, M)
Initial dictionary matrix
- Sarray_like, shape (N, K)
Signal vector or matrix
- lmbdafloat
Regularisation parameter
- opt
BPDNDictLearn.Options
objectAlgorithm options
- class Options(opt=None)[source]¶
Bases:
sporco.dictlrn.dictlrn.DictLearn.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
: Optionssporco.admm.bpdn.BPDN.Options
CMOD
: Optionssporco.admm.cmod.CnstrMOD.Options
- Parameters
- optdict or None, optional (default None)
BPDNDictLearn algorithm options
- solve()¶
Call graph