Description Usage Arguments Value References Examples
Ontology loss function may be used when the class labels are organized has an ontology structure
1 2 | ontologyLoss(x, y, l = 1 - table(seq_along(y), y),
dag = diag(nlevels(y)))
|
x |
instance matrix, where x(t,) defines the features of instance t |
y |
target vector where y(t) is an integer encoding target of x(t,) |
l |
loss matrix. l(t,p(t)) must be the loss for predicting target p(t) instead of y(t) for instance t. By default, the parameter is set to a 0/1 loss matrix. |
dag |
a numeric matrix defining the path in the Direct Acyclic Graph (DAG) to each class label |
a function taking one argument w and computing the loss value and the gradient at point w
Teo et al. A Scalable Modular Convex Solver for Regularized Risk Minimization. KDD 2007
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.