PlayGround

Test

Test 2

Test 3

\sum \frac{X}{Y} ==

Test 4

Test 5

from MFrag import SQLDiscreteCPTBN;
def likelihoodWeighting(bn):
nodes = bn.getNodes();
def likelihoodWeightingStep(bn, nodes, evidence):
for node in nodes:
pass;
def lwSample(bn, node, evidence):
# Sample parents
parents = bn.getParents(node);
pValues = {}
if(len(parents) > 0):
for parent in parents:
pValues[parent] = lwSample(bn, parent, evidence);
# Sample node
cft = bn.stateFreq(db, node, parents, cft=True);
return CFTtoCPT(cft, )
def CFTtoCPT():
pass;