Home | Trees | Index | Help |
|
---|
Package nltk_lite :: Module probability :: Class LidstoneProbDist |
|
object
--+ |ProbDistI
--+ | LidstoneProbDist
ELEProbDist
,
LaplaceProbDist
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.
Method Summary | |
---|---|
Use the Lidstone estimate to create a probability distribution for the experiment used to generate freqdist . | |
string
|
Return a string representation of this ProbDist . |
FreqDist
|
Return the frequency distribution that this probability distribution is based on. |
any |
Return the sample with the greatest probability. |
float |
Return the probability for a given sample. |
list
|
Return a list of all samples that have nonzero probabilities. |
Inherited from ProbDistI :
logprob
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|
Method Details |
---|
__init__(self,
freqdist,
gamma,
bins=None)
Use the Lidstone estimate to create a probability distribution for
the experiment used to generate |
__repr__(self)
|
freqdist(self)
|
max(self)
|
prob(self, sample)
|
samples(self)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 | http://epydoc.sf.net |