__init__(self,
freqdist,
bins)
(Constructor)
Creates a Good-Turing probability distribution estimate. This method
calculates the probability mass to assign to events with zero or low
counts based on the number of events with higher counts. It does so by
using the smoothed count c*:
-
c* = (c + 1) N(c + 1) / N(c)
where c is the original count, N(i) is the number of event types observed with count
i. These smoothed counts are then normalised to
yield a probability distribution.
The bins parameter allows N(0) to be
estimated.
-
- Parameters:
freqdist -
The frequency counts upon which to base the estimation.
(type=FreqDist )
bins -
The number of possible event types. This must be at least as
large as the number of bins in the freqdist . If
None , then it's taken to be equal to
freqdist.B() .
(type=Int )
- Overrides:
nltk_lite.probability.ProbDistI.__init__
|