class documentation

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.

Method __init__ Use the cross-validation estimate to create a probability distribution for the experiment used to generate freqdists.
Method __repr__ Return a string representation of this ProbDist.
Method discount Return the ratio by which counts are discounted on average: c*/c
Method freqdists Return the list of frequency distributions that this ProbDist is based on.
Method prob Return the probability for a given sample. Probabilities are always real numbers in the range [0, 1].
Method samples Return a list of all samples that have nonzero probabilities. Use prob to find the probability of each sample.
Constant SUM_TO_ONE True if the probabilities of the samples in this probability distribution will always sum to one.
Instance Variable _freqdists Undocumented
Instance Variable _heldout_probdists Undocumented

Inherited from ProbDistI:

Method generate Return a randomly selected sample from this probability distribution. The probability of returning each sample samp is equal to self.prob(samp).
Method logprob Return the base 2 logarithm of the probability for a given sample.
Method max Return the sample with the greatest probability. If two or more samples have the same probability, return one of them; which sample is returned is undefined.
def __init__(self, freqdists, bins): (source)

Use the cross-validation estimate to create a probability distribution for the experiment used to generate freqdists.

Parameters
freqdists:list(FreqDist)A list of the frequency distributions generated by the experiment.
bins:intThe 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().
def __repr__(self): (source)

Return a string representation of this ProbDist.

Returns
strUndocumented
def discount(self): (source)

Return the ratio by which counts are discounted on average: c*/c

Returns
floatUndocumented
def freqdists(self): (source)

Return the list of frequency distributions that this ProbDist is based on.

Returns
list(FreqDist)Undocumented
def prob(self, sample): (source)

Return the probability for a given sample. Probabilities are always real numbers in the range [0, 1].

Parameters
sample:anyThe sample whose probability should be returned.
Returns
floatUndocumented
def samples(self): (source)

Return a list of all samples that have nonzero probabilities. Use prob to find the probability of each sample.

Returns
listUndocumented
SUM_TO_ONE: bool = (source)

True if the probabilities of the samples in this probability distribution will always sum to one.

Value
False
_freqdists = (source)

Undocumented

_heldout_probdists: list = (source)

Undocumented