public class Huber extends Object implements RegressionObjective
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_COST |
Constructor and Description |
---|
Huber()
Huber Loss using the default cost
DEFAULT_COST . |
Huber(double cost)
Huber loss using the supplied cost.
|
Modifier and Type | Method and Description |
---|---|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
loss(DenseVector truth,
SGDVector prediction)
Deprecated.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
lossAndGradient(DenseVector truth,
SGDVector prediction)
Scores a prediction, returning the loss and a vector of per output dimension gradients.
|
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
String |
toString() |
public static final double DEFAULT_COST
public Huber()
DEFAULT_COST
.public Huber(double cost)
cost
- The cost.public void postConfig()
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
@Deprecated public com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> loss(DenseVector truth, SGDVector prediction)
RegressionObjective
loss
in interface RegressionObjective
truth
- The true regression value.prediction
- The predicted regression value.public com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> lossAndGradient(DenseVector truth, SGDVector prediction)
SGDObjective
lossAndGradient
in interface SGDObjective<DenseVector>
lossAndGradient
in interface RegressionObjective
truth
- The true output.prediction
- The prediction for each dimension.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.