A probability distribution for the outcomes of an experiment. A
probability distribution specifies how likely it is that an experiment
will have any given outcome. For example, a probability distribution
could be used to predict the probability that a token in a document will
have a given type. Formally, a probability distribution can be defined
as a function mapping from samples to nonnegative real numbers, such that
the sum of every number in the function's range is 1.0.
ProbDists are often used to model the probability
distribution of the experiment used to generate a frequency
distribution.
|
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
float
|
prob(self,
sample)
Returns:
the probability for a given sample. |
source code
|
|
|
float
|
logprob(self,
sample)
Returns:
the natural logarithm of the probability for a given sample. |
source code
|
|
|
any
|
max(self)
Returns:
the sample with the greatest probability. |
source code
|
|
list
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|