getHinge | R Documentation |
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.
getHinge(hinge = "quadratic", delta = 3, eps = 1e-08)
hinge |
Hinge error function to be used, possible values are
|
delta |
The parameter of the huber hinge
(only if |
eps |
Specifies the maximum steepness of the quadratic majorization
function |
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
).
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.
svmmaj
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.