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

Infer with single evidence that has multiple values/states #142

Open
SEICS opened this issue Jul 8, 2022 · 1 comment
Open

Infer with single evidence that has multiple values/states #142

SEICS opened this issue Jul 8, 2022 · 1 comment

Comments

@SEICS
Copy link

SEICS commented Jul 8, 2022

Hi,

I wonder what is the syntax for doing inference with single evidence (evidence is a single variable only) but referring to different values of this evidence.

For example:
I would like to query A's probability while observing C has values 1,2 and 3 and B values 2.
ϕ = infer(bn, [:a], evidence=Assignment(:c=>[1,2,3],:b=>2))

Currently, when I query for such cases, especially while I have variables that own a large number of states, the code statements could be tedious and I would like to avoid this. I have looked at the .jl docs but I didn't find the solution.

Can anyone help me with this? Thank you so much for your patience!

@tawheeler
Copy link
Contributor

I'm not sure we can condition on multiple instances for a particular variable. Here, the variable c has to take on a single value rather than three. That might be a useful feature to add though. If you find a good way to do it, feel free to submit a PR.

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

2 participants