Learn R Programming

SVMMaj (version 0.2.9.3)

getHinge: Hinge error function of SVM-Maj

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

getHinge(hinge = "quadratic", delta = 3, eps = 1e-08)

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).

Arguments

hinge

Hinge error function to be used, possible values are 'absolute', 'quadratic' and 'huber'

delta

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.

References

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

See Also

svmmaj

Examples

Run this code
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
print(loss)
plot(hingefunction, z = 3)

Run the code above in your browser using DataLab