Probability

Frequency distributions

FreqDist

A frequency distribution for the outcomes of an experiment.

ConditionalFreqDist

A collection of frequency distributions for a single experiment run under different conditions.

Probability distributions

ConditionalProbDist

A conditional probability distribution modeling the experiments that were used to generate a conditional frequency distribution.

CrossValidationProbDist

The cross-validation estimate for the probability distribution of the experiment used to generate a set of frequency distribution.

DictionaryConditionalProbDist

An alternative ConditionalProbDist that simply wraps a dictionary of ProbDists rather than creating these from FreqDists.

DictionaryProbDist

A probability distribution whose probabilities are directly specified by a given dictionary.

ELEProbDist

The expected likelihood estimate for the probability distribution of the experiment used to generate a frequency distribution.

SimpleGoodTuringProbDist

SimpleGoodTuring ProbDist approximates from frequency to frequency of frequency into a linear line under log space by linear regression.

HeldoutProbDist

The heldout estimate for the probability distribution of the experiment used to generate two frequency distributions.

LaplaceProbDist

The Laplace estimate for the probability distribution of the experiment used to generate a frequency distribution.

LidstoneProbDist

The Lidstone estimate for the probability distribution of the experiment used to generate a frequency distribution.

MLEProbDist

The maximum likelihood estimate for the probability distribution of the experiment used to generate a frequency distribution.

MutableProbDist

An mutable probdist where the probabilities may be easily modified.

KneserNeyProbDist

Kneser-Ney estimate of a probability distribution.

UniformProbDist

A probability distribution that assigns equal probability to each sample in a given set; and a zero probability to all other samples.

WittenBellProbDist

The Witten-Bell estimate of a probability distribution.

Functions

add_logs(logx, logy)

Given two numbers logx = log(x) and logy = log(y), return log(x+y).

log_likelihood(test_pdist, actual_pdist)

sum_logs(logs)

entropy(pdist)