nltk.UniformProbDist
¶
-
class
nltk.
UniformProbDist
(samples)[source]¶ A probability distribution that assigns equal probability to each sample in a given set; and a zero probability to all other samples.
Methods¶
__init__ (samples) |
Construct a new uniform probability distribution, that assigns equal probability to each sample in samples . |
discount () |
Return the ratio by which counts are discounted on average: c*/c |
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 () |
|
prob (sample) |
|
samples () |
|
unicode_repr () |
Attributes¶
SUM_TO_ONE |