Skip to content
New issue

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

.constrain without Identity silently fails for ProductSPN #109

Open
jamesonquinn opened this issue Mar 30, 2021 · 0 comments
Open

.constrain without Identity silently fails for ProductSPN #109

jamesonquinn opened this issue Mar 30, 2021 · 0 comments

Comments

@jamesonquinn
Copy link

with open("data/sppl/merged.json","r") as datafile: #gender test data set
    data = datafile.read()

spn = spn_from_dict(json.loads(data))

psn = spn.children[0]

psn2= psn.constrain({'gender' : "female"})
assert psn.prob(Identity('height') > 180) == psn2.prob(Identity('height') > 180)

(This should fail, either because Identity is missing from the constrain, or because constraining should change the probability. But instead it succeeds.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant