Closed jdmartin86 closed 5 years ago
Suggested edit on line 577 rv.py:
def marginalize(self, *dims, normalize=None):
Thx for the feedback! Your suggested edit looks reasonable. I will try it out and keep you updated.
I pushed f35cbac4bb980d9ae809bd46c53027947235fe9a to master, which should solve the reported issue.
Hello,
When trying the test case (test.txt) with Gaussian variables, I receive the following error
Traceback (most recent call last): File "npbp.py", line 31, in
belief = inference.sum_product(fg, x4)
File "/home/jdmartin86/.local/lib/python3.5/site-packages/fglib/inference.py", line 63, in sum_product
return belief_propagation(graph, query_node)
File "/home/jdmartin86/.local/lib/python3.5/site-packages/fglib/inference.py", line 42, in belief_propagation
msg = u.spa(v)
File "/home/jdmartin86/.local/lib/python3.5/site-packages/fglib/nodes.py", line 271, in spa
msg = msg.marginalize(n, normalize=False)
TypeError: marginalize() got an unexpected keyword argument 'normalize'