Created
March 6, 2015 09:40
-
-
Save palashahuja/e6dd41c31a52f588fa0d to your computer and use it in GitHub Desktop.
let's start with this ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if evidence: | |
for evidence_var in evidence: | |
for factor in working_factors[evidence_var]: | |
factor_reduced = factor.reduce('{evidence_var}_{state}'.format(evidence_var=evidence_var, | |
state=evidence[evidence_var]), | |
inplace=False) | |
for var in factor_reduced.scope(): | |
working_factors[var].remove(factor) | |
working_factors[var].add(factor_reduced) | |
del working_factors[evidence_var] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment