sporco.pgm.cmod¶
PGM algorithm for the CMOD problem
Functions
|
Construct constraint set projection function. |
|
Subtract mean of each column of matrix. |
|
Normalise columns of matrix. |
Classes
|
PGM algorithm for a constrained variant of the Method of Optimal Directions (MOD) [20] problem, referred to here as Constrained MOD (CMOD). |
|
PGM algorithm for a weighted variant of Constrained MOD (CMOD) problem. |
Function Descriptions¶
- sporco.pgm.cmod.getPcn(zm, nnc)[source]¶
Construct constraint set projection function.
- Parameters
- zmbool
Flag indicating whether the projection function should include column mean subtraction
- nncbool
Flag indicating whether the projection function should include clipping to positive values
- Returns
- fnfunction
Constraint set projection function
Class Descriptions¶
- class sporco.pgm.cmod.CnstrMOD(*args, **kwargs)[source]¶
Bases:
sporco.pgm.pgm.PGM
PGM algorithm for a constrained variant of the Method of Optimal Directions (MOD) [20] problem, referred to here as Constrained MOD (CMOD).
Solve the optimisation problem
\[\mathrm{argmin}_D \| D X - S \|_2^2 + \iota_C(D)\]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, attributeitstat
is a list of tuples representing statistics of each iteration. The fields of the named tupleIterationStats
are:
Iter
: Iteration number
DFid
: Value of data fidelity term \((1/2) \| D X - S \|_2^2\)
Cnstr
: Constraint violation measure
Rsdl
: Residual
L
: Inverse of gradient step parameter
Time
: Cumulative run time
- Parameters
- Zarray_like, shape (M, K)
Sparse representation coefficient matrix
- Sarray_like, shape (N, K)
Signal vector or matrix
- dsztuple
Dictionary size
- opt
CnstrMOD.Options
objectAlgorithm options
- class Options(opt=None)[source]¶
Bases:
sporco.pgm.pgm.PGM.Options
CnstrMOD algorithm options
Options include all of those defined in
pgm.PGM.Options
, together with additional options:
ZeroMean
Flag indicating whether the solutiondictionary \(D\) should have zero-mean components.
NonNegCoef
Flag indicating whether the solutiondictionary \(D\) should have non-negative coefficients.
Note that
ZeroMean
andNonNegCoef
may not both be True.
- Parameters
- optdict or None, optional (default None)
CnstrMOD algorithm options
- class sporco.pgm.cmod.WeightedCnstrMOD(*args, **kwargs)[source]¶
Bases:
sporco.pgm.cmod.CnstrMOD
PGM algorithm for a weighted variant of Constrained MOD (CMOD) problem.
Solve the optimisation problem
\[\mathrm{argmin}_D \| D X - S \|_W^2 + \iota_C(D)\]where \(\iota_C(\cdot)\) is the indicator function of feasible set \(C\) consisting of matrices with unit-norm columns and \(\| \cdot \|_W\) denotes the weighted Frobenius norm defined as (note that this is not the standard definition)
\[\| X \|_W^2 = \| W^{1/2} \odot X \|_F\]so that
\[\| X \|_W^2 = \sum_i \| W_i^{1/2} \mathbf{x}_i \|_2^2 = \sum_i \| \mathbf{x}_i \|_{W_i}^2 \;,\]where \(\mathbf{x}_i\) and \(\mathbf{w}_i\) are the \(i^{\text{th}}\) columns of \(X\) and \(W\) respectively, and \(W_i = \mathrm{diag}(\mathbf{w}_i)\).
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
DFid
: Value of data fidelity term \((1/2) \| D X - S \|_W^2\)
Cnstr
: Constraint violation measure
Rsdl
: Residual
L
: Inverse of gradient step parameter
Time
: Cumulative run time
- Parameters
- Zarray_like, shape (M, K)
Sparse representation coefficient matrix
- Sarray_like, shape (N, K)
Signal matrix
- Warray_like, shape (N, K)
Weight matrix
- dsztuple
Dictionary size
- opt
WeightedCnstrMOD.Options
objectAlgorithm options