Basis pursuit denoising / Lasso¶
Basis pursuit denoising (BPDN) seeks the solution to the problem
which, for a particular value of \(\lambda\), is equivalent to the Least absolute shrinkage and selection operator (Lasso).
Real instances of the problem are expressable as a Quadratic Program by decomposing \(x\) into its positive and negative parts, say \(x = u - v\), and posing the problem
By default, Elemental solves this quadratic program via a Mehrotra Predictor-Corrector primal-dual Interior Point Method.
Python API¶
-
BPDN
(A, b, lambd[, ctrl=None])¶ - Parameters
A – dense or sparse, sequential or distributed matrix
b – dense right-hand side vector (with type compatible to
A
)lambd – penalty on the one-norm of the solution vector
ctrl – (optional)
BPDNCtrl_s
orBPDNCtrl_d
instance, depending upon whether the data is single-precision or double-precision
- Return type
dense solution vector (with type matching that of
b
)
C++ API¶
-
void
BPDN
(const Matrix<Real> &A, const Matrix<Real> &b, Real lambda, Matrix<Real> &x, const BPDNCtrl<Real> &ctrl = BPDNCtrl<Real>())¶
-
void
BPDN
(const ElementalMatrix<Real> &A, const ElementalMatrix<Real> &b, Real lambda, ElementalMatrix<Real> &x, const BPDNCtrl<Real> &ctrl = BPDNCtrl<Real>())¶
-
void
BPDN
(const SparseMatrix<Real> &A, const Matrix<Real> &b, Real lambda, Matrix<Real> &x, const BPDNCtrl<Real> &ctrl = BPDNCtrl<Real>())¶
-
void
BPDN
(const DistSparseMatrix<Real> &A, const DistMultiVec<Real> &b, Real lambda, DistMultiVec<Real> &x, const BPDNCtrl<Real> &ctrl = BPDNCtrl<Real>())¶
C API¶
Single-precision¶
Double-precision¶
-
ElError
ElBPDNDist_d
(ElConstDistMatrix_d A, ElConstDistMatrix_d b, double lambda, ElDistMatrix_d x)¶
-
ElError
ElBPDNDistSparse_d
(ElConstDistSparseMatrix_d A, ElConstDistMultiVec_d b, double lambda, ElDistMultiVec_d x)¶
Expert interface¶
Single-precision¶
-
ElError
ElBPDNX_s
(ElConstMatrix_s A, ElConstMatrix_s b, float lambda, ElMatrix_s x, ElBPDNCtrl_s ctrl)¶
-
ElError
ElBPDNXDist_s
(ElConstDistMatrix_s A, ElConstDistMatrix_s b, float lambda, ElDistMatrix_s x, ElBPDNCtrl_s ctrl)¶
Double-precision¶
-
ElError
ElBPDNX_d
(ElConstMatrix_d A, ElConstMatrix_d b, double lambda, ElMatrix_d x, ElBPDNCtrl_d ctrl)¶
-
ElError
ElBPDNXDist_d
(ElConstDistMatrix_d A, ElConstDistMatrix_d b, double lambda, ElDistMatrix_d x, ElBPDNCtrl_d ctrl)¶