Child pages
  • Evidence Scenario File

Contents

It is possible to associate an evidence scenario file with a Bayesian network. This file contains a series of evidence sets that are applied on the Observable Nodes of the network, i.e. the nodes that do not have a cost set to "Not Observable" (see costs). This file can be written by the user and then imported, but it can be also generated by registering the evidences done with the monitors. After that, this generated file can be exported. A comment can be associated with each set of evidences. This comment will be displayed in the network's status bar during interactive inference or interactive updating.

Types of Evidence

There are four possible types of evidence which are the same as ones obtained with the monitors: 

  1. Exact evidence on a state of a node
  2. Likelihood distribution over the states of a node
  3. Probability distribution over the states of a node (fixed distribution with exact inference or computation of the corresponding likelihoods with approximate inference)
  4. Target mean for a node (determining a probability distribution corresponding to the target mean and taking the others observations into account)

Sometimes a fixed probability distribution cannot be done because the algorithm used to reach the target distribution fails to converge. In this case the corresponding probability fixing is not done and the node comes back to its initial state. An information message is displayed in the console.

Temporal

When a network is temporal, it uses the Time variable or although it has at least a temporal node, the time step can be set by indicating its value with a positive or null integer.

Syntax

It is a text file where each line is formatted with the following grammar:

for the temporal networks:

<line> ::= <time step> [<semicolon> [<evidence> | <likelihood> | <probability>| <mean>]]+ [<comment>]

<time step> is an integer representing the time step at which the following evidences are set.

for the not temporal networks:

<line> ::= [<evidence> | <likelihood> | <probability> | <mean>] [<semicolon> [<evidence> | <like- lihood> | <probability>| <mean>]]* [<comment>]

<semicolon> is the character ; (semicolon)

<colon> is the character : (colon)

<evidence> ::= <variable> <colon> <state>

it is possible to use directly a numerical value for a continuous node:

<evidence> ::= <variable> <colon> <numerical value>
<likelihood> ::= <variable> <colon>l{ <likelihood list> [<semicolon> <likelihood list>]+ }
<likelihood list> ::= <state> <colon> <degree of likelihood>
<probability> ::=<variable> <colon> p{ <probability list> [<semicolon> <probability list>]+ }
<probability list> ::= <state> <colon> <degree of probability>
<mean> ::= <variable> <colon> m{ <numerical value> }

<variable> corresponds to the variable name, flanked by question marks, for which there is an evidence, and <state> indicates the concerned state.

<comment> ::=<two slashes> <any character string>


Example

 The following example contains exact evidences, likelihoods and probabilities for four time steps :

0;?Valve1?:OK;?Valve2?:OK;?Valve3?:OK //All the valves are working
2;?Valve1 t+1?:l{OK:0.8;RC:0.9;RO:0.9}
20;?Valve2 t+1?:l{OK:0.3;RO:0.3;RC:0.3};?Valve1 t+1?{OK:0.2;RO:0.4;RC:0.4}
30;?Valve3 t+1?:OK;?Valve1 t+1?{OK:0;RO:0.8;RC:0.2}

When a temporal evidence file is associated with a temporal network, the evidences are taken into account each time the time meter reaches one of the specified time steps. When the file and the network are not temporal, the evidences are taken into account during interactive inference or during interactive updating.

The following example shows not temporal evidences and also evidences with numerical values:

?Smoker?:Yes;?Age?:25.5;?Bronchitis?{Yes:0.8;No:0.2}//Young smoker with a large probability of bronchitis
?Smoker?:No;?Age?:70;Dyspnea:l{Yes:0.8;No:0.5} //Non-smoker senior person

Creating Evidences with Monitors

When the user is in validating mode, it is possible to store the evidences done on the monitors with the button  located in the monitor toolbar. When a set of evidence is added, it is possible to append a comment to it thanks to the proposed dialog box.

When an evidence scenario file is created or imported, the icon  is displayed in the network's status bar. The tooltip associated with this icon indicates the number of evidence sets contained in the file. A click on this button allows us to remove the association between the network and the file.

Importing/Exporting Evidence Scenario Files

The menu Data>Associate an Evidence Scenario File allows loading a file from the hard drive. Any in- valid evidence is ignored. At the end of the importation, a summary of the errors met is displayed if necessary.

The menu Data>Export an Evidence Scenario File allows saving, into a text file, the current evidence scenario file.

Batch Exploitation

If an evidence scenario file is associated with the network, it is possible to use it as data source for the batch exploitation of the network:

  • Batch labeling
  • Batch inference
  • Batch labeling with most probable explanation 
  • Batch inference with most probable explanation 
  • Batch joint probability
  • Batch likelihood