We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fg = graphs.FactorGraph() x1 = nodes.VNode("x1", rv.Discrete) x2 = nodes.VNode("x2", rv.Discrete) x3 = nodes.VNode("x3", rv.Discrete) x4 = nodes.VNode("x4", rv.Discrete) x5 = nodes.VNode("x5", rv.Discrete) dist_fa = [ [ [0.1, 0.2], [0.1, 0.1] ], [ [0.2, 0.05], [0.2, 0.05] ] ] fa = nodes.FNode("fa", rv.Discrete(dist_fa, x1, x2,x3)) dist_fb = [[0.1, 0.4], [0.2, 0.3]] fb = nodes.FNode("fb", rv.Discrete(dist_fb, x3, x4)) dist_fc = [[0.5, 0.1], [0.2, 0.2]] fc = nodes.FNode("fc", rv.Discrete(dist_fc, x3, x5)) fg.set_nodes([x1, x2, x3, x4, x5]) fg.set_nodes([fa,fb,fc]) fg.set_edge(x1, fa) fg.set_edge(x2, fa) fg.set_edge(fa, x3) fg.set_edge(x4, fb) fg.set_edge(fb, x3) fg.set_edge(x3, fc) fg.set_edge(fc, x5) fg.set_edge(x2, fb) fg.set_edge(fb, x3) fg.set_edge(x2, fc) fg.set_edge(fc, x4) belief = inference.max_sum(fg,x5)`
for this problem I get Value assignment x5 0 x3 1 x1 3 x2 1 x4 0 but all of the variables are binary. SO x1 = 3 does not looks right
The text was updated successfully, but these errors were encountered:
Thx for the feedback. Yes, there seems to be something wrong. I will have a look.
Sorry, something went wrong.
No branches or pull requests
for this problem I get Value assignment
x5 0
x3 1
x1 3
x2 1
x4 0
but all of the variables are binary. SO x1 = 3 does not looks right
The text was updated successfully, but these errors were encountered: