nltk.ELEProbDist
¶
-
class
nltk.
ELEProbDist
(freqdist, bins=None)[source]¶ 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 equivalent to adding 0.5 to the count for each bin, and taking the maximum likelihood estimate of the resulting frequency distribution.
Methods¶
__init__ (freqdist[, bins]) |
Use the expected likelihood estimate to create a probability distribution for the experiment used to generate freqdist . |
discount () |
|
freqdist () |
Return the frequency distribution that this probability distribution is based on. |
generate () |
Return a randomly selected sample from this probability distribution. |
logprob (sample) |
Return the base 2 logarithm of the probability for a given sample. |
max () |
|
prob (sample) |
|
samples () |
|
unicode_repr () |
Return a string representation of this ProbDist . |
Attributes¶
SUM_TO_ONE |