Discrete distribution represented as a dictionary. Can be sparse, in
the sense that elements that are not explicitly contained in the
dictionary are assumed to have zero probability.
|
__init__(self,
dictionary) |
|
|
|
dictCopy(self)
Returns:
A copy of the dictionary for this distribution. |
|
|
|
prob(self,
elt)
Returns:
the probability associated with elt
|
|
|
|
support(self)
Returns:
A list (in arbitrary order) of the elements of this distribution with
non-zero probabability. |
|
|
|
|
|
|
|
draw(self)
Returns:
a randomly drawn element from the distribution |
|
|
|
maxProbElt(self)
Returns:
The element in this domain with maximum probability |
|
|
|
marginalizeOut(self,
index)
Returns:
DDist on all the rest of the variables |
|
|
|
conditionOnVar(self,
index,
value)
Returns:
new distribution, conditioned on variable i having value
value , and with variable i removed from all
of the elements (it's redundant at this point). |
|
|