Interface RegressionObjective
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,SGDObjective<DenseVector>
- All Known Implementing Classes:
AbsoluteLoss,Huber,SquaredLoss
An interface for regression objectives.
-
Method Summary
Modifier and TypeMethodDescriptionloss(DenseVector truth, SGDVector prediction) Deprecated.In 4.1 to move to the new name, lossAndGradient.lossAndGradient(DenseVector truth, SGDVector prediction) Scores a prediction, returning the loss and a vector of per output dimension gradients.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
loss
@Deprecated com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> loss(DenseVector truth, SGDVector prediction) Deprecated.In 4.1 to move to the new name, lossAndGradient.Scores a prediction, returning the loss.- Parameters:
truth- The true regression value.prediction- The predicted regression value.- Returns:
- A pair with the loss and gradient.
-
lossAndGradient
default com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> lossAndGradient(DenseVector truth, SGDVector prediction) Description copied from interface:SGDObjectiveScores a prediction, returning the loss and a vector of per output dimension gradients.- Specified by:
lossAndGradientin interfaceSGDObjective<DenseVector>- Parameters:
truth- The true output.prediction- The prediction for each dimension.- Returns:
- The score and per dimension gradient.
-