Description Usage Arguments Value References See Also Examples
The loss function for Preference loss
1 | preferenceLoss(x, P)
|
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. |
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.