Class 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 Detail

      • Estimator

        protected Estimator​(double[] counts,
                            int size,
                            Alphabet dictionary)
      • Estimator

        public Estimator​(double[] counts,
                         Alphabet dictionary)
      • Estimator

        public Estimator()
      • Estimator

        public Estimator​(int size)
      • Estimator

        public 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​(FeatureVector fv,
                              double scale)
      • getCount

        public double getCount​(int index)
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • print

        public void print()