![]() |
Quantum Fog
0.9.3
|
Public Member Functions | |
def | __init__ (self, clique) |
def | init_clique_potentials (self, variables) |
def | merge (self, sepset, tree) |
def | reinitialize (self, variables) |
def | enter_evidence (self, evidence, nodes) |
![]() | |
def | __init__ (self, nodes) |
def | add_node (self, node) |
def | member_of (self, node) |
def | contains (self, nodes) |
def | connect_nodes (self, node1, node2) |
Public Attributes | |
initialized | |
likelihoods | |
![]() | |
nodes | |
JoinTree is the final graph that is constructed for JunctionTree Inference. To create the JoinTree, we first create a forest of n JoinTrees where each tree consists of a single clique (n is the number of cliques). Then we create a list of all distinct pairs. Then we insert a sepset between each pair of cliques. Then we loop n - 1 times. At each iteration, we choose the next best sepset according to some heuristic. If we the two cliques connected to the sepset are on different trees, we join them into one larger tree.
def PBNT.Graph.JoinTree.enter_evidence | ( | self, | |
evidence, | |||
nodes | |||
) |
For all nodes that are not blank, we want to make its family clique consistent with the evidence. This can be done by setting all values of the clique that are consistent with the evidence to 1 and all other places to 0.