Package nltk_lite :: Module probability :: Class ELEProbDist
[show private | hide private]
[frames | no frames]

Type ELEProbDist

  object --+        
           |        
   ProbDistI --+    
               |    
LidstoneProbDist --+
                   |
                  ELEProbDist


The expected likelihood estimate for the probability distribution of the experiment used to generate a frequency distribution. The expected likelihood estimate approximates the probability of a sample with count c from an experiment with N outcomes and B bins as (c+0.5)/(N+B/2). This is equivalant to adding 0.5 to the count for each bin, and taking the maximum likelihood estimate of the resulting frequency distribution.
Method Summary
  __init__(self, freqdist, bins)
Use the expected likelihood estimate to create a probability distribution for the experiment used to generate freqdist.
string __repr__(self)
Return a string representation of this ProbDist.
Inherited from LidstoneProbDist: freqdist, max, prob, samples
Inherited from ProbDistI: logprob
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Method Details

__init__(self, freqdist, bins=None)
(Constructor)

Use the expected likelihood estimate to create a probability distribution for the experiment used to generate freqdist.
Parameters:
freqdist - The frequency distribution that the probability estimates should be based on.
           (type=FreqDist)
bins - The number of sample values that can be generated by the experiment that is described by the probability distribution. This value must be correctly set for the probabilities of the sample values to sum to one. If bins is not specified, it defaults to freqdist.B().
           (type=int)
Overrides:
nltk_lite.probability.LidstoneProbDist.__init__

__repr__(self)
(Representation operator)

Returns:
A string representation of this ProbDist.
           (type=string)
Overrides:
nltk_lite.probability.LidstoneProbDist.__repr__

Generated by Epydoc 2.1 on Tue Sep 5 09:37:22 2006 http://epydoc.sf.net