Quantum Fog  0.9.3
Public Member Functions | Private Member Functions | List of all members
PBNT.Inference.EnumerationEngine Class Reference
Inheritance diagram for PBNT.Inference.EnumerationEngine:
Inheritance graph
[legend]
Collaboration diagram for PBNT.Inference.EnumerationEngine:
Collaboration graph
[legend]

Public Member Functions

def marginal (self, nodes)
 
- Public Member Functions inherited from PBNT.Inference.InferenceEngine
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

- Public Attributes inherited from PBNT.Inference.InferenceEngine
 bnet
 
 evidence
 

Detailed Description

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.

Member Function Documentation

def PBNT.Inference.EnumerationEngine.__enumerate_all (   self,
  node,
  value 
)
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.

The documentation for this class was generated from the following file: