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:
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:
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
- defaults = {'AccurateDFid': False, 'BPDN': {'AbsStopTol': 0.0, 'AutoRho': {'AutoScaling': True, 'Enabled': True, 'Period': 10, 'RsdlRatio': 1.2, 'RsdlTarget': None, 'Scaling': 1000.0, 'StdResiduals': False}, 'AuxVarObj': True, 'Callback': None, 'DataType': None, 'FastSolve': False, 'IterTimer': 'solve', 'L1Weight': 1.0, 'LinSolveCheck': False, 'MaxMainIter': 1000, 'NonNegCoef': False, 'RelStopTol': 0.001, 'RelaxParam': 1.8, 'ReturnX': False, 'StatusHeader': True, 'U0': None, 'Verbose': False, 'Y0': None, 'fEvalX': False, 'gEvalY': True, 'rho': None}, 'CMOD': {'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}, 'Callback': None, 'IterTimer': 'solve', 'MaxMainIter': 1000, 'StatusHeader': True, 'Verbose': False}¶
Default content and allowed dict keys
- solve()¶
Call graph