nltk.LidstoneProbDist.__init__

LidstoneProbDist.__init__(freqdist, gamma, bins=None)[source]

Use the Lidstone 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.
  • gamma (float) – A real number used to parameterize the estimate. The Lidstone estimate is equivalent to adding gamma to the count for each bin, and taking the maximum likelihood estimate of the resulting frequency distribution.
  • 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().