public class LogMulticlass extends Object implements LabelObjective
Generates a probabilistic model, and uses an ExpNormalizer
.
Constructor and Description |
---|
LogMulticlass() |
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.
|
String |
toString() |
com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> |
valueAndGradient(int truth,
SGDVector prediction)
Returns a
Pair of Double and the supplied prediction vector. |
public com.oracle.labs.mlrg.olcut.util.Pair<Double,SGDVector> valueAndGradient(int truth, SGDVector prediction)
Pair
of Double
and the supplied prediction vector.
The prediction vector is transformed to produce the per label gradient.
valueAndGradient
in interface LabelObjective
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.