This extends perceptrons \cite{books/daglib/0066902} but uses what is known as the Hinge loss (aka SVM loss):
$$J_i(w) = max(0,\gamma -y\_i f(x\_i))$$
Where $\gamma$ is the margin. $J_i(w)$ is the error given some weight $w$ parameters. $x_i$ and $y_i$ are a training example and correct label. $f(x_i)$ is the perceptron function we are trying learn the best weights for.