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

Class ELEProbDist

source code

  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.

Instance Methods [hide private]
 
__init__(self, freqdist, bins=None)
Use the expected likelihood estimate to create a probability distribution for the experiment used to generate freqdist.
source code
string
__repr__(self)
Returns: A string representation of this ProbDist.
source code

Inherited from LidstoneProbDist: discount, freqdist, max, prob, samples

Inherited from ProbDistI: generate, logprob

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]

Inherited from LidstoneProbDist: SUM_TO_ONE

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

Use the expected likelihood estimate to create a probability distribution for the experiment used to generate freqdist.

Parameters:
  • freqdist (FreqDist) - The frequency distribution that the probability estimates should be based on.
  • bins (int) - 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().
Overrides: LidstoneProbDist.__init__

__repr__(self)
(Representation operator)

source code 
Returns: string
A string representation of this ProbDist.
Overrides: LidstoneProbDist.__repr__