The Lidstone estimate for the probability distribution of the
experiment used to generate a frequency distribution. The Lidstone
estimate
is paramaterized by a real number gamma, which typically ranges from 0 to 1. The Lidstone
estimate approximates the probability of a sample with count c from an experiment with N outcomes
and B bins as (c+gamma)/(N+B*gamma). This is equivalant to adding gamma to the count for each bin, and taking the maximum
likelihood estimate of the resulting frequency distribution.
|
__init__(self,
freqdist,
gamma,
bins=None)
Use the Lidstone estimate to create a probability distribution for
the experiment used to generate freqdist . |
source code
|
|
FreqDist
|
freqdist(self)
Returns:
The frequency distribution that this probability distribution is
based on. |
source code
|
|
float
|
prob(self,
sample)
Returns:
the probability for a given sample. |
source code
|
|
any
|
max(self)
Returns:
the sample with the greatest probability. |
source code
|
|
list
|
|
string
|
|
Inherited from ProbDistI :
logprob
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|