Package cc.mallet.types
Class Multinomial.Estimator
- java.lang.Object
-
- cc.mallet.types.Multinomial.Estimator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
Multinomial.MAPEstimator
,Multinomial.MEstimator
- Enclosing class:
- Multinomial
public abstract static class Multinomial.Estimator extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
A hierarchy of classes used to produce estimates of probabilities, in the form of a Multinomial, from counts associated with the elements of an Alphabet. Estimator itself contains the machinery for associating and manipulating counts with elements of an Alphabet, including behaving sanely if the Alphabet changes size between calls. It does not contain any means of generating probability estimates; various means of estimating are provided by subclasses.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
protected void
ensureCapacity(int index)
abstract Multinomial
estimate()
double
getCount(int index)
void
increment(int index, double count)
void
increment(FeatureSequence fs)
void
increment(FeatureSequence fs, double scale)
void
increment(FeatureVector fv)
void
increment(FeatureVector fv, double scale)
void
increment(java.lang.String key, double count)
void
print()
void
reset()
void
setAlphabet(Alphabet d)
int
size()
-
-
-
Method Detail
-
setAlphabet
public void setAlphabet(Alphabet d)
-
size
public int size()
-
ensureCapacity
protected void ensureCapacity(int index)
-
reset
public void reset()
-
increment
public void increment(int index, double count)
-
increment
public void increment(java.lang.String key, double count)
-
increment
public void increment(FeatureSequence fs, double scale)
-
increment
public void increment(FeatureSequence fs)
-
increment
public void increment(FeatureVector fv, double scale)
-
increment
public void increment(FeatureVector fv)
-
getCount
public double getCount(int index)
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
print
public void print()
-
estimate
public abstract Multinomial estimate()
-
-