| Method Summary |
| |
__init__(self,
prob_dict,
log,
normalize)
Construct a new probability distribution from the given dictionary,
which maps values to probabilities (or to log probabilities, if
log is true). |
| |
__repr__(self)
|
| float
|
logprob(self,
sample)
Return the natural logarithm of the probability for a given sample. |
| any
|
max(self)
Return the sample with the greatest probability. |
| float
|
prob(self,
sample)
Return the probability for a given sample. |
list
|
samples(self)
Return a list of all samples that have nonzero probabilities. |
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__
|