Solution (source code)

= Solution

For a convex surrogate margin loss $\phi$, the empirical risk is
$$
\widehat R_\phi(h)=\frac1n\sum_{i=1}^n
\phi(y_ih(x_i)).
$$
It replaces the discontinuous classification error by a convex penalty on signed margins.