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

Public Member Functions

def __init__ (self, bnet, do_print=False, is_quantum=False)
 
def get_unipot_list (self, node_list)
 
def story_generator (self)
 
def get_story_potential_val (self, annotated_story)
 
- Public Member Functions inherited from inference.InferenceEngine.InferenceEngine
def __init__ (self, bnet, do_print=False, is_quantum=False)
 

Public Attributes

 bnet_ord_nodes
 
- Public Attributes inherited from inference.InferenceEngine.InferenceEngine
 bnet
 
 do_print
 
 is_quantum
 

Additional Inherited Members

- Static Public Member Functions inherited from inference.InferenceEngine.InferenceEngine
def print_annotated_story (annotated_story)
 

Detailed Description

EnumerationEngine is an InferenceEngine that enumerates all (brute force
method) possible instantiations (aka stories, histories, Feynman paths)
consistent with the active states of each node.

Attributes
----------
bnet_ord_nodes : list[BayesNode]

bnet : BayesNet
do_print : bool
is_quantum : bool

Constructor & Destructor Documentation

def inference.EnumerationEngine.EnumerationEngine.__init__ (   self,
  bnet,
  do_print = False,
  is_quantum = False 
)
Constructor

Parameters
----------
bnet : BayesNet
do_print : bool
is_quantum : bool

Returns
-------

Member Function Documentation

def inference.EnumerationEngine.EnumerationEngine.get_story_potential_val (   self,
  annotated_story 
)
Given an annotated story (i.e., a dictionary that maps all nodes to
their current state), it returns a float for CBnets and a complex
for QBnet. The returned value is the pot value for that particular
annotated story.

Parameters
----------
annotated_story : dict[Node, int]

Returns
-------
complex
def inference.EnumerationEngine.EnumerationEngine.get_unipot_list (   self,
  node_list 
)
For each node in node_list, this method returns a uni-potential that
gives the probabilities for the states of that node. Obviously,
such a PD has the active states of the node as support.

Parameters
----------
node_list : list[BayesNode]

Returns
-------
list[DiscreteUniPot]
def inference.EnumerationEngine.EnumerationEngine.story_generator (   self)
Generate the next possible story constrained by the evidence (i.e.,
by the active states of each node).

Returns
-------
itertools.product

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