preferenceLoss: The loss function for Preference loss

Description Usage Arguments Value References See Also Examples

Description

The loss function for Preference loss

Usage

1

Arguments

x

matrix of training instances (one instance by row)

P

a data.frame with 3 fields (i,j,cost) that specify the cost for prefering sample j over sample i.

Value

a function taking one argument w and computing the loss value and the gradient at point w

References

Teo et al. Bundle Methods for Regularized Risk Minimization JMLR 2010

See Also

nrbm

Examples

1
2
3
x <- data.matrix(iris[1:4])
P <- expand.grid(i=which(iris$Species=="virginica"),j=which(iris$Species!="virginica"))
w <- nrbm(preferenceLoss(x,P),LAMBDA=0.001,EPSILON_TOL=0.0001)

bmrm documentation built on May 2, 2019, 2:49 p.m.