Least Absolute Value regression¶
Least Absolute Value (LAV) regression minimizes a residual \(b - A x\) in the one-norm, i.e.,
\[\min_x \| A x - b \|_1,\]
and is known to be the solution of a linear program when \(A\) and \(b\) are real. In particular, we may solve
\[\begin{split}\min_{x,u,v} \{\; 1^T \begin{pmatrix} u \\ v \end{pmatrix} \; | \; \begin{pmatrix} A & I & -I \end{pmatrix} \begin{pmatrix} x \\ u \\ v \end{pmatrix} = b \; \wedge \; u,v \ge 0 \; \}.\end{split}\]
By default, Elemental solves this linear program via a Mehrotra Predictor-Corrector primal-dual Interior Point Method.
Python API¶
-
LAV
(A, b[, ctrl=None])¶ - Parameters
A – dense or sparse, sequential or distributed matrix
b – dense right-hand side vector (with type compatible to
A
)ctrl – (optional)
LPAffineCtrl
instance
- Return type
dense solution vector (with type matching that of
b
)
C++ API¶
-
void
LAV
(const Matrix<Real> &A, const Matrix<Real> &b, Matrix<Real> &x, const lp::affine::Ctrl<Real> &ctrl = lp::affine::Ctrl<Real>())¶
-
void
LAV
(const ElementalMatrix<Real> &A, const ElementalMatrix<Real> &b, ElementalMatrix<Real> &x, const lp::affine::Ctrl<Real> &ctrl = lp::affine::Ctrl<Real>())¶
-
void
LAV
(const SparseMatrix<Real> &A, const Matrix<Real> &b, Matrix<Real> &x, const lp::affine::Ctrl<Real> &ctrl = lp::affine::Ctrl<Real>())¶
-
void
LAV
(const DistSparseMatrix<Real> &A, const DistMultiVec<Real> &b, DistMultiVec<Real> &x, const lp::affine::Ctrl<Real> &ctrl = lp::affine::Ctrl<Real>())¶
C API¶
Single-precision¶
Double-precision¶
-
ElError
ElLAVDistSparse_d
(ElConstDistSparseMatrix_d A, ElConstDistMultiVec_d b, ElDistMultiVec_d x)¶
Expert interface¶
Single-precision¶
-
ElError
ElLAVXDist_s
(ElConstDistMatrix_s A, ElConstDistMatrix_s b, ElDistMatrix_s x, ElLPAffineCtrl_s ctrl)¶