getHinge: Hinge error function of SVM-Maj

Description Usage Arguments Value References See Also Examples

View source: R/hinge.R

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
getHinge(hinge = "quadratic", delta = 3, eps = 1e-08)

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.

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

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

1
2
3
4
5
6
7
8
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)

SVMMaj documentation built on May 2, 2019, 9:58 a.m.