cc.mallet.types
Class Multinomial.Estimator

java.lang.Object
  extended by 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

Constructor Summary
  Multinomial.Estimator()
           
  Multinomial.Estimator(Alphabet dictionary)
           
  Multinomial.Estimator(double[] counts, Alphabet dictionary)
           
protected Multinomial.Estimator(double[] counts, int size, Alphabet dictionary)
           
  Multinomial.Estimator(int size)
           
 
Method Summary
 java.lang.Object clone()
           
protected  void ensureCapacity(int index)
           
abstract  Multinomial estimate()
           
 double getCount(int index)
           
 void increment(FeatureSequence fs)
           
 void increment(FeatureSequence fs, double scale)
           
 void increment(FeatureVector fv)
           
 void increment(FeatureVector fv, double scale)
           
 void increment(int index, double count)
           
 void increment(java.lang.String key, double count)
           
 void print()
           
 void reset()
           
 void setAlphabet(Alphabet d)
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
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 class java.lang.Object

print

public void print()

estimate

public abstract Multinomial estimate()