nltk.MLEProbDist

class nltk.MLEProbDist(freqdist, bins=None)[source]

The maximum likelihood estimate for the probability distribution of the experiment used to generate a frequency distribution. The “maximum likelihood estimate” approximates the probability of each sample as the frequency of that sample in the frequency distribution.

Methods

__init__(freqdist[, bins]) Use the maximum likelihood estimate to create a probability distribution for the experiment used to generate freqdist.
discount() Return the ratio by which counts are discounted on average: c*/c
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()
rtype:str

Attributes

SUM_TO_ONE