Fix and use the unnormalized sum convention for the penalty. The linear soft-margin support vector machine solves
Eliminating the slack variables of a support vector machine gives , where and the maximum is the hinge loss. The classifier uses the sign of and its support-vector-machine decision boundary is .
For clarity about dual support vectors and margin degeneracy, let be the multipliers of the margin constraints. The Karush-Kuhn-Tucker conditions give
The dual support vectors are those with . A coefficient strictly between and puts a point exactly on its margin boundary; a point with positive slack has . A zero coefficient implies zero slack and signed margin at least one. Geometrically one often counts all points with as support vectors. At a degeneracy, equality can occur with , so the two descriptions need not coincide. Either convention supports the bound in the following part when stated consistently.
The hard-margin constraints are feasible exactly when the classes are separated by a separating hyperplane. Failure after the corrections in part a therefore means the classes overlap.
Introduce slack variables of a support vector machine and solve the soft-margin problem
subject to
Large strongly penalizes violations and approaches the hard-margin solution when separation is possible. Small tolerates more violations in exchange for a wider, more strongly regularized margin.
The are slack variables of a support vector machine. The solid line is the support-vector-machine decision boundary
The dashed lines are the two support-vector-machine margin boundaries
Each is at perpendicular distance from the decision boundary, so the full margin width is .
Increasing raises the cost of slack variables of a support vector machine. The fit therefore generally accepts fewer margin violations and misclassifications, at the price of a larger and hence a narrower support-vector-machine margin. Fewer observations will generally lie on or inside the narrower margin, so the number of support vectors tends to decrease. These are qualitative tendencies; individual counts need not vary monotonically for every data set.