Skip to content

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

@SEICS

Description

@SEICS

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions