cc.mallet.types
Class Multinomial.Logged
java.lang.Object
cc.mallet.types.SparseVector
cc.mallet.types.FeatureVector
cc.mallet.types.Multinomial
cc.mallet.types.Multinomial.Logged
- All Implemented Interfaces:
- AlphabetCarrying, ConstantMatrix, Vector, java.io.Serializable
- Enclosing class:
- Multinomial
public static class Multinomial.Logged
- extends Multinomial
A Multinomial in which the values associated with each feature index fi is
Math.log(probability[fi]) instead of probability[fi].
Logs are used for numerical stability.
- See Also:
- Serialized Form
Methods inherited from class cc.mallet.types.FeatureVector |
alphabetsMatch, cloneMatrix, cloneMatrixZeroed, contains, getAlphabets, getObjectIndices, location, newFeatureVector, toSimpFile, toString, toString, value |
Methods inherited from class cc.mallet.types.SparseVector |
absNorm, addTo, addTo, arrayCopyFrom, arrayCopyFrom, arrayCopyInto, dotProduct, dotProduct, dotProduct, dotProduct, extendedDotProduct, extendedDotProduct, getDimensions, getIndices, getNumDimensions, getValues, incrementValue, indexAtLocation, infinityNorm, isBinary, isInfinite, isNaN, isNaNOrInfinite, location, makeBinary, makeNonBinary, map, numLocations, oneNorm, plusEqualsSparse, plusEqualsSparse, print, removeDuplicates, setAll, setValue, setValueAtLocation, singleIndex, singleSize, singleToIndices, singleValue, sortIndices, timesEquals, timesEqualsSparse, timesEqualsSparse, timesEqualsSparseZero, twoNorm, value, value, valueAtLocation, vectorAdd |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Multinomial.Logged
public Multinomial.Logged(double[] probabilities,
Alphabet dictionary,
int size,
boolean areLoggedAlready)
Multinomial.Logged
public Multinomial.Logged(double[] probabilities,
Alphabet dictionary,
boolean areLoggedAlready)
Multinomial.Logged
public Multinomial.Logged(double[] probabilities,
Alphabet dictionary,
int size)
Multinomial.Logged
public Multinomial.Logged(double[] probabilities,
Alphabet dictionary)
Multinomial.Logged
public Multinomial.Logged(Multinomial m)
Multinomial.Logged
public Multinomial.Logged(double[] probabilities)
probability
public double probability(int featureIndex)
- Overrides:
probability
in class Multinomial
logProbability
public double logProbability(int featureIndex)
- Overrides:
logProbability
in class Multinomial
addProbabilities
public void addProbabilities(double[] vector)
addLogProbabilities
public void addLogProbabilities(double[] vector)