Learn R Programming

SVMMaj (version 0.2-2)

hinge: 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', hingek = 3, eps= 1e-8)
# S3 method for 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).

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.

See Also

svmmaj

Examples

Run this code
# NOT RUN {
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

# }

Run the code above in your browser using DataLab