Solution (source code)

= Solution

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
$$
\min_{b,\beta,\xi}
\left\{\frac12\|\beta\|_2^2+C\sum_i\xi_i\right\}
$$
subject to
$$
y_i(b+X_i^T\beta)\geq1-\xi_i,
\qquad \xi_i\geq0.
$$
Large $C$ strongly penalizes violations and approaches the hard-margin solution when separation is possible. Small $C$ tolerates more violations in exchange for a wider, more strongly regularized margin.