public interface LabelObjective
extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
An objective knows if it generates a probabilistic model or not, and what kind of normalization needs to be applied to produce probability values.
Modifier and Type | Method and Description |
---|---|
VectorNormalizer |
getNormalizer()
Generates a new
VectorNormalizer which normalizes the predictions into [0,1]. |
boolean |
isProbabilistic()
Does the objective function score probabilities or not?
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
valueAndGradient(int truth,
SGDVector prediction)
Scores a prediction, returning the loss and a vector of per label gradients.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> valueAndGradient(int truth, SGDVector prediction)
truth
- The true label id.prediction
- The prediction for each label id.VectorNormalizer getNormalizer()
VectorNormalizer
which normalizes the predictions into [0,1].boolean isProbabilistic()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.