public class LogMulticlass extends Object implements LabelObjective
Generates a probabilistic model, and uses an ExpNormalizer
.
Constructor and Description |
---|
LogMulticlass()
Constructs a multiclass log loss.
|
Modifier and Type | Method and Description |
---|---|
VectorNormalizer |
getNormalizer()
Generates a new
VectorNormalizer which normalizes the predictions into [0,1]. |
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
boolean |
isProbabilistic()
Returns true.
|
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
lossAndGradient(Integer truth,
SGDVector prediction)
|
String |
toString() |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
valueAndGradient(int truth,
SGDVector prediction)
Deprecated.
|
@Deprecated public com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> valueAndGradient(int truth, SGDVector prediction)
LabelObjective
valueAndGradient
in interface LabelObjective
truth
- The true label id.prediction
- The prediction for each label id.public com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> lossAndGradient(Integer truth, SGDVector prediction)
Pair
of Double
and SGDVector
representing the loss
and per label gradients respectively.
The prediction vector is transformed to produce the per label gradient and returned.
lossAndGradient
in interface LabelObjective
lossAndGradient
in interface SGDObjective<Integer>
truth
- The true label idprediction
- The prediction for each label idpublic VectorNormalizer getNormalizer()
LabelObjective
VectorNormalizer
which normalizes the predictions into [0,1].getNormalizer
in interface LabelObjective
public boolean isProbabilistic()
isProbabilistic
in interface LabelObjective
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.