Learn R Programming

bmrm (version 1.7)

hingeLoss: Hinge Loss function for SVM

Description

Hinge Loss function for SVM

Usage

hingeLoss(w, x, y, cache = NULL, loss.weights = 1)

Arguments

w
weight vector where the function have to be evaluated
x
matrix of training instances (one instance by row)
y
numeric vector of values in (-1,+1) representing the training labels for each instance in x
cache
if NULL (which is the case at the first call) parameters values are checked
loss.weights
numeric vector of loss weights to incure for each instance of x in case of misprediction. Vector length should match length(y), but values are cycled if not of identical size. Default to 1 so we define a standard 0/1 loss for SVM classifier. The

Value

  • a 2 element list (value,gradient) where "value" is the value of the function at point w, and "gradient" is the gradient of the loss function at w

References

Teo et al. A Scalable Modular Convex Solver for Regularized Risk Minimization. KDD 2007

See Also

bmrm