Class Huber
java.lang.Object
org.tribuo.regression.sgd.objectives.Huber
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,RegressionObjective
Huber loss, i.e., a mixture of l2 and l1 losses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
loss
(DenseVector truth, SGDVector prediction) Scores a prediction, returning the loss.void
Used by the OLCUT configuration system, and should not be called by external code.toString()
-
Constructor Details
-
Huber
public Huber() -
Huber
-
-
Method Details
-
postConfig
Used by the OLCUT configuration system, and should not be called by external code.- Specified by:
postConfig
in interfacecom.oracle.labs.mlrg.olcut.config.Configurable
-
loss
public com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> loss(DenseVector truth, SGDVector prediction) Description copied from interface:RegressionObjective
Scores a prediction, returning the loss.- Specified by:
loss
in interfaceRegressionObjective
- Parameters:
truth
- The true regression value.prediction
- The predicted regression value.- Returns:
- A pair with the loss and gradient.
-
toString
-
getProvenance
- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-