Dynamic Bayesian Networks: Performing Inference
From DSL
Performing inference on a DBN is very easy. Just like performing inference on a BN, it is just a matter of setting evidence and updating the posterior beliefs by right-clicking the network area,clicking Network-> Update Beliefs, or pressing F5. However, with temporal networks, some extra steps need to be taken. Imagine the following situation:
During the shift, the guard does not observe an umbrella only on the fourth day. This means that the evidence vector for the Umbrella node is the following: Umbrella0:6= {true,true,true,false, true, true, true }.
Setting temporal evidence: We have collected evidence for the temporal network and now we want to add it. Before the addition of evidence, the number of time-slices of the temporal network needs to be set by clicking on Network->Slice Count. The number of time-slices denote the time-period of interest, in our case we set it to 8 as shown in the figures below:
After setting the number of time-slices, we can add the evidence by right-clicking Umbrella and selecting Evidence from the context menu. Because this is a temporal node, a form appears where evidence can be added for every time-slice. The figure below demonstrates the addition of evidence.
Temporal Posterior Beliefs:
After we call inference, the temporal network has its beliefs updated. The updated beliefs for a temporal node can be obtained by placing the cursor on the checkmark icon for the Rain node and the evidence for the Umbrella node can be viewed similarly as shown in the figures below:
The updated beliefs for a temporal node can also be obtained by double-clicking on the (Rain) node and selecting the Value tab . This tab contains the updated beliefs for all time-slices of that node not only in floating point numbers, but also as an area chart, contour plot, and time-series plot as shown in the figure below:
Area plot: It represents the relative contributions of each data over time. To view the Area Plot select the [ Image:AreaIcon.jpg ] icon.
Contour plot: It represents a three dimensional space with the dimensions: time (x-a xis), state (y-axis), and probability of an outcome at every point in time (the color). This representation is especially useful for temporal nodes that have many states, while the other two representations are more useful for temporal nodes with not too many states. To view the Contour Plot select the [ Image:Contour Icon.jpg ] icon.
Time Series Plot: It represents the contribution of a data/s over each instance of time. To view the Time Series Plot select the [ Image:TimeSeries Icon.jpg ] icon.
An alternate option to view the temporal beliefs is by switching the plate nodes in the DBN to Barchart view. To view nodes as Bar Charts, select Node-> View As -> Bar chart from the Menu bar. The bar charts for the temporal nodes will display each state probability over time as shown in the figure below:
Unrolling Network:
It can be useful for debugging purposes to explicitly unroll a temporal network for a given number of time-slices. GeNIe provides this possibility through the Network -> Unroll option. When clicking this option, GeNIe opens a new network that has the temporal network unrolled for the given number of time-slices. It is possible to locate a node in the temporal network from the unrolled network by right-clicking on the node in the unrolled network and selecting -> Locate Original in DBN from the context-menu. The unrolled network that is a result from unrolling the temporal network is cleared from any temporal information whatsoever. It can be edited, saved and restored just like any other static network. Figure below shows the unrolled network representation of a temporal network and how the original DBN can located back from the unrolled network.
To view nodes as Bar Charts, select Node-> View As -> Bar chart from the Menu bar. The following unrolled network will be displayed.
Terminologies:
Anchor node: An anchor node is a node outside the temporal plate that has one or more children inside the temporal plate. If the DBN is unrolled for inference, the anchor node is only connected to its children in the first time-slice of the unrolled network.
Terminal node: A terminal node is a node outside the temporal plate that has one or more parents inside the temporal plate. If the DBN is unrolled for inference, the terminal node is only connected to its parents in the last time-slice of the unrolled network.














