Class SquaredLoss
java.lang.Object
org.tribuo.regression.sgd.objectives.SquaredLoss
- 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
Squared loss, i.e., l2.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenanceloss(DenseVector truth, SGDVector prediction) Scores a prediction, returning the loss.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.ConfigurablepostConfig
- 
Constructor Details- 
SquaredLosspublic SquaredLoss()
 
- 
- 
Method Details- 
losspublic com.oracle.labs.mlrg.olcut.util.Pair<Double, SGDVector> loss(DenseVector truth, SGDVector prediction) Description copied from interface:RegressionObjectiveScores a prediction, returning the loss.- Specified by:
- lossin interface- RegressionObjective
- Parameters:
- truth- The true regression value.
- prediction- The predicted regression value.
- Returns:
- A pair with the loss and gradient.
 
- 
toString
- 
getProvenance- Specified by:
- getProvenancein interface- com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
 
 
-