nltk.CrossValidationProbDist

class nltk.CrossValidationProbDist(freqdists, bins)[source]

The cross-validation estimate for the probability distribution of the experiment used to generate a set of frequency distribution. The “cross-validation estimate” for the probability of a sample is found by averaging the held-out estimates for the sample in each pair of frequency distributions.

Methods

__init__(freqdists, bins) Use the cross-validation estimate to create a probability distribution for the experiment used to generate freqdists.
discount()
freqdists() Return the list of frequency distributions that this ProbDist 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() Return the sample with the greatest probability.
prob(sample)
samples()
unicode_repr() Return a string representation of this ProbDist.

Attributes

SUM_TO_ONE