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

public interface RegressionObjective extends SGDObjective<DenseVector>
An interface for regression objectives.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    default com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector>
    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

    postConfig

    Methods 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: SGDObjective
      Scores a prediction, returning the loss and a vector of per output dimension gradients.
      Specified by:
      lossAndGradient in interface SGDObjective<DenseVector>
      Parameters:
      truth - The true output.
      prediction - The prediction for each dimension.
      Returns:
      The score and per dimension gradient.