# hinge: Hinge error function of SVM-Maj In SVMMaj: SVMMaj algorithm

## Description

This function creates a function to compute the hinge error, given its predicted value `q` and its class `y`, according to the loss term of the Support Vector machine loss function.

## Usage

 ```1 2 3``` ```getHinge(hinge = 'quadratic', hingek = 3, eps= 1e-8) ## S3 method for class 'hinge' plot(x, y=1, z=NULL,...) ```

## Arguments

 `hinge` Hinge error function to be used, possible values are `'absolute'`, `'quadratic'` and `'huber'` `hingek` The parameter of the huber hinge (only if `hinge = 'huber'`). `eps` Specifies the maximum steepness of the quadratic majorization function `m(q) = a*q^2 -2*b*q + c`, where `a <= .25* eps^-1`. `x` The hinge object returned from `getHinge`. `y` Specifies the class (`-1` or `1`) to be plotted for the hinge error. `z` If specified, the majorization function with the supporting point `z` will also be plotted. `...` Other arguments passed to plot method.

## Value

The hinge error function with arguments `q` and `y` to compute the hinge error. The function returns a list with the parameters of the majorization function SVM-Maj (`a`, `b` and `c`) and the loss error of each object (`loss`).

## Author(s)

Hok San Yip, Patrick J.F. Groenen, Georgi Nalbantov

## References

P.J.F. Groenen, G. Nalbantov and J.C. Bioch (2008) SVM-Maj: a majorization approah to linear support vector machines with different hinge errors.

`svmmaj`
 ```1 2 3 4 5 6``` ```hingefunction <- getHinge() ## plot hinge function value and, if specified, the majorization function at z plot(hingefunction,z=3) ## generate loss function value loss <- hingefunction(q = -10:10 ,y = 1)\$loss loss ```