![]() |
Quantum Fog
0.9.3
|
Public Member Functions | |
def | marginal (self, nodes) |
![]() | |
def | __init__ (self, bnet) |
def | marginal (self) |
Private Member Functions | |
def | __enumerate_all (self, node, value) |
def | __initialize (self, nonEvidence) |
def | __next_state (self, nonEvidence) |
def | __probability (self, state) |
Additional Inherited Members | |
![]() | |
bnet | |
evidence | |
Enumeration Engine uses an unoptimized fully enumerate brute force method to compute the marginal of a query. It also uses the standard constructor, init_evidence, and change_evidence methods. In this engine, we use a hack. We have to check and see if the variable is unobserved. If it is not, then we know that the probability of that value is automatically 1. We use this hack, because in order to do it properly, a table of likelihoods that incorporates the evidence would have to be constructed, this is very costly.
|
private |
We are going to iterate through all values of all non-evidence nodes. For each state of the evidence we sum the probability of that state by the probabilities of all other states.