![]() |
Quantum Fog
0.9.3
|
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) |
![]() | |
def | __init__ (self, bnet, do_print=False, is_quantum=False) |
Public Attributes | |
bnet_ord_nodes | |
![]() | |
bnet | |
do_print | |
is_quantum | |
Additional Inherited Members | |
![]() | |
def | print_annotated_story (annotated_story) |
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
def inference.EnumerationEngine.EnumerationEngine.__init__ | ( | self, | |
bnet, | |||
do_print = False , |
|||
is_quantum = False |
|||
) |
Constructor Parameters ---------- bnet : BayesNet do_print : bool is_quantum : bool Returns -------
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