Support vector machines¶
Given a set of vectors \(\{a_i\}_{i=0}^{n-1} \subset \mathbb{R}^m\) and binary labels \(\{\eta_i\} \subset \{0,1\}\), a soft-margin Support Vector Machine solves the problem
where \(h(t)\) is the hinge loss, or unit ramp function, which is zero when \(t \le 0\) and equal to \(t\) otherwise, and whose purpose is to linearly penalize the modeled distance of a point from a chosen hyperplane separator.
The pair \((w,\beta)\) can be interpreted as an unnormalized description of the hyperplane which approximately partitions the labeled data. In particular, \(w\)’s direction is the normal for the hyperplane, \(\beta/\|w\|_2\) is the offset of the plane from the origin in the direction of \(w\), and \(1/\|w\|_2\) is the half-margin of the separator, which is the minimum distance a point can be from the separator without being penalized.
Note
While sometimes functional, this implementation is still very much a work-in-progress.
C++ API¶
-
Int
SVM
(const Matrix<Real> &G, const Matrix<Real> &q, Matrix<Real> &z, Real gamma, Real rho = 1, Int maxIter = 500, bool inv = true, bool progress = true)¶
-
Int
SVM
(const AbstractDistMatrix<Real> &G, const AbstractDistMatrix<Real> &q, AbstractDistMatrix<Real> &z, Real gamma, Real rho = 1, Int maxIter = 500, bool inv = true, bool progress = true)¶