Creating DBN

<< Click to Display Table of Contents >>

Navigation:  Using QGeNIe > Dynamic Bayesian networks >

Creating DBN

We will use QGeNIe to create a qualitative model of a time-dependent domain focusing on a manufacturer's decision whether to produce a high quality product and whether this will have effect on profits and market share.

We start modeling with enabling the Temporal Plate, which is a special construct in the Graph View that allows for building dynamic models

 

network_menu_dynamic_models

The effect of enabling temporal plate in the Graph View is the following

temporal_plate

The Temporal Plate divides the Graph View into four areas:

Contemporals, which is the part of the Graph View window that is outside of the temporal plate. All nodes outside of the Temporal Plate are static.

Init Conditions, which is the part of the network area where, so called, anchor nodes are stored. An anchor node is a node outside of the temporal plate that has one or more children inside the temporal plate. Anchor nodes are similar to static nodes outside of the temporal plate but they are only connected to their children in the first time-slice of the network.

Temporal Plate, which is the main part representing the dynamic model. Nodes in the Temporal Plate are the only nodes that are allowed to have Temporal Arcs. This area also shows the number of time-slices for which inference will be performed.

Term Conditions, which is the part of the network area where the terminal nodes are stored. A terminal node is a node outside of the temporal plate that has one or more parents inside the temporal plate. Terminal nodes are only connected to its parents in the last time-slice of the network.

The size of the Temporal Plate can be changed by clicking and dragging its edges and so can the sizes of its three areas (Init Conditions, Temporal Plate, and Term Conditions). There is a small subtlety in resizing the three. If you click and drag the extreme right or extreme left edge of the temporal plate, it is the middle part (the Temporal Plate) that gets resized and the sizes of Init Conditions and Temporal Plate remain the same. Pressing the SHIFT button when dragging the edges has the effect that the size of the Temporal Plate remains the same and the sizes of Init Conditions and Temporal Plate change.

For our example, we set the number of steps to 24. We can either double-click or right-click on the header of the Temporal Plate

temporal_plate_header_menu

which will invoke the Time Step Count dialog that allows to change the Time step count

time_step_count_dialog

Time steps have no units and are a matter of interpretation of the modeler. In our model, we can interpret the time step as one month but in any other model it could mean a year, a day, or a millisecond.

We create the following nodes: High Quality of the Product, Product Reputation, High Production Cost, Aggressive Advertizing, High Price, High Sales, High Profits, Large Market Share, and Company's Reputation in the Temporal Plate and the Company's Current Reputation node in the Init Conditions area.

product_temporal_nodes

The next step is to connect these nodes. There are two types of arc between nodes: normal arcs and temporal arcs. Let us first create an arc between Aggressive Advertizing and High Production Costs. We click on the Arc button (arc_button), subsequently click on the node Aggressive Advertizing and drag and release the mouse inside the node High Production Costs. A menu pops up.

add_normal_arc

We select Normal arc, which creates an arc between Aggressive Advertizing and High Production Costs. and show the familiar arc type dialog

arc_type

We select Cause for this interaction, which results in a normal (static) arc between the two variables. The next arc to add will be a temporal arc between the nodes Product Reputation and Aggressive Advertizing. We start again with clicking on the Arc button (arc_button), subsequently clicking on Aggressive Advertizing and dragging and releasing the mouse inside the node Product Reputation.

add_temporal_arc

This time we want to indicate that the influence of Aggresive Advertizing on Product Reputation is not immediate but takes one time step. We select a (temporal) Order 1 arc that we subsequently designate as a Cause in the arc type dialog.

product_temporal_arcs

We continue adding arcs between nodes, quantify them (the model Product Temporal.qdsl can be found among the example models) and create the following structure

product_temporal

There is one type of temporal arcs inside the Temporal Plate that was not allowed in static models, namely arcs starting and ending at the same node and, by this forming cycles. Cycles represent temporal processes and are allowed only for temporal arcs. Similarly to static networks, normal arcs are not allowed to form cycles, even inside temporal plates. Arcs in Temporal Plate can start and end in the same node. We create such arcs by starting and ending the drawing in the same node. These arcs essentially mean that the state of the variable in question at time t influences its state at time t+1. For example, reputation gained (Product Reputation and Company's Reputation) tends to stick. Dynamic models allow for cycles. For example, we have that Product Reputation influences Company's Reputation and Company's Reputation influences Product Reputation. The interpretation of such cycles is simple: Any temporal influence links variable in two different time slices and when these slices are unrolled, there are no cycles.

Please note there while most of the temporal arcs are labeled with [1], meaning that they are temporal influences of the first order, there is one arc in the model (from Product Reputation to Company's Reputation) that is labeled [2], representing a temporal influence of order 2. QGeNIe is unique among the existing Bayesian network software in that it allows for any order influences, which means that DBNs in QGeNIe can model dynamic processes of any order.

Quantification of this model proceeds in the same way as quantification of static models (please see the section on Building a qualitative Bayesian network for examples).

This concludes the creation and specification of the DBN modeling the problem. There is another way of creating a DBN. Rather than constructing it directly in the Temporal Plate, we can construct a BN in the Graph View window, drag it into the Temporal Plate, and then add temporal links. This has to be done cautiously, as the order of dragging can make a difference. For example, if we drag a node into the Temporal Plate, QGeNIe will remove all its outgoing arcs, as it is not allowed to have arcs from temporal plate enter nodes in the Contemporals section. To avoid that, we can best drag entire groups of nodes into the temporal plate, in which case no links will be deleted.

In the next section, we will show how to use dynamic models to obtain insight into the modeled domain.