powered by
The loss function for Preference loss
preferenceLoss(x, P)
matrix of training instances (one instance by row)
a data.frame with 3 fields (i,j,cost) that specify the cost for prefering sample j over sample i.
a function taking one argument w and computing the loss value and the gradient at point w
Teo et al. Bundle Methods for Regularized Risk Minimization JMLR 2010
nrbm
# NOT RUN { 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) # }
Run the code above in your browser using DataLab