el0ps.utils.compute_lmbd_max¶
- el0ps.utils.compute_lmbd_max(datafit, penalty, A)¶
Return a value \(\lambda_{\max}\) such that the all-zero vector is a solution of an L0-regularized problem whenever \(\lambda \geq \lambda_{\max}\).
The problem is expressed as :rtype:
float
\[\textstyle\min_{\mathbf{x} \in \mathbb{R}^{n}} f(\mathbf{Ax}) + \lambda\|\mathbf{x}\|_0 + h(\mathbf{x})\]where \(f\) is a
el0ps.datafit.BaseDatafit
function, \(\mathbf{A} \in \mathbb{R}^{m \times n}\) is a matrix, \(h\) is ael0ps.penalty.BasePenalty
function, and \(\lambda\) is a positive scalar.- Parameters:
- datafit: BaseDatafit
Problem datafit function.
- penalty: BasePenalty
Problem penalty function.
- A: NDArray
Problem matrix.
- Returns:
- lmbd_max: float
The value
lmbd_max
ensuring an all-zero solution.