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
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Multinomial.Estimator
protected Multinomial.Estimator(double[] counts,
int size,
Alphabet dictionary)
Multinomial.Estimator
public Multinomial.Estimator(double[] counts,
Alphabet dictionary)
Multinomial.Estimator
public Multinomial.Estimator()
Multinomial.Estimator
public Multinomial.Estimator(int size)
Multinomial.Estimator
public Multinomial.Estimator(Alphabet dictionary)
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 class java.lang.Object
print
public void print()
estimate
public abstract Multinomial estimate()