Skip to Content

Evidence Scenario File Syntax

Context

As with BayesiaLab’s Dictionaries, the syntax of an Evidence Scenario File is straightforward. However, we need to distinguish between the syntax for Contemporaneous and Temporal networks:

Contemporaneous Networks

  • Each line of an Evidence Scenario File represents one Evidence Scenario.

  • Encoding an Evidence Scenario always follows the same pattern, with the node name and the evidence separated by a colon :. The optional scenario name follows after a double slash //.
    ?<NodeName>?:<Evidence>//<ScenarioName>

  • Evidence can be encoded in several ways in an Evidence Scenario File:

    • Hard Evidence:
      ?<NodeA>?:<State1>//Scenario1

    • Numerical Evidence:
      ?<NodeB>?:m{<value>}//Scenario2

    • Probabilistic Evidence:
      ?<NodeC>?:p{<StateA>:0.3;<StateB>:0.5;<StateC>:0.2}//Scenario3

    • Likelihood Evidence:
      ?<NodeD>?:l{<StateX>:1;<StateY>:0.5}//Scenario4

  • To encode multiple pieces of evidence in one Evidence Scenario, separate the individual pieces of evidence with a semicolon. The scenario name remains at the end of the line, separated by a double slash.
    ?<NodeA>?:<State1>;?<NodeB>?:m{<value>};?<NodeC>?:p{<StateA>:0.3;<StateB>:0.5;<StateC>:0.2};?<NodeD>?:l{<StateX>:1;<StateY>:0.5}//Scenario5

Temporal Networks

  • For Temporal Bayesian networks, the syntax of the Evidence Scenario File is slightly different. Each line in the text file refers to a time step, and the evidence specified in that line is applied at that step.

  • Each line starts with an integer value that represents the time step at which the evidence in that line will be set.
    <TimeStep2>;?<NodeName>?:<Evidence> <TimeStep4>;?<NodeName>?:<Evidence> <TimeStep19>;?<NodeName>?:<Evidence>

  • To encode multiple pieces of evidence in one time step, separate the individual pieces of evidence with a semicolon.
    <TimeStep3>;?<NodeA>?:<State1>;?<NodeB>?:m{<value>};?<NodeC>?:p{<StateA>:0.3;<StateB>:0.5;<StateC>:0.2};?<NodeD>?:l{<StateX>:1;<StateY>:0.5}\\Evidence for Step 3 <TimeStep5>;?<NodeA>?:<State3>;?<NodeB>?:m{<value>};?<NodeC>?:p{<StateA>:0.1;<StateB>:0.7;<StateC>:0.2};?<NodeD>?:l{<StateX>:0.1;<StateY>:0.5}\\Evidence for Step 5

  • For Temporal networks, recalling evidence from the Evidence Scenario File is different compared to Contemporaneous networks.

  • The time-specific Evidence Scenarios are set automatically as you perform a temporal simulation.

    TemporalSimulationBar