Determining the d-relations in a network can be done in Hugin when in run-mode. This is done using the operations available in the D-Separation submenu of the Network menu. This submenu is shown in Figure 1.
Figure 1: The D-Separation submenu. |
When a d-separation operation has been performed, the visual representation of the network changes to show the result of the operation. A node can be represented in five different ways depending on its role in the operation:
The source node. That is, the node whose relation to all the target nodes will be determined. | |
A connected target node. That is, the source node is d-connected to this node. | |
A separated target node. That is, the source node is d-separated from this node. | |
An instantiated node. The d-relation to the source node is not determined. | |
An "anonymous" node. That is, a node which is none of the above. |
The fastest way to test the d-relation between two nodes in the network is to select the nodes and choose the "Show D-Relation" operation. This will mark the two nodes as being either connected or separated given the inserted evidence. Figure 2 shows the result of this operation when selecting the nodes "Has tuberculosis" and "Has bronchitis" with no inserted evidence.
Figure 2: "Has tuberculosis" and "Has bronchitis" are d-separated, given that no evidence is inserted in the network. |
This operation will display the result of performing the currently configured d-separation function. If the d-separation has not yet been configured, a default configuration is used. This configuration uses the currently selected node as the source, and all other nodes as targets. No evidence is defined.
While this configuration may be sufficient, it is recommended to create a custom configuration for the d-separation operation. This allows for definition of evidence, which is taken into consideration when calculation the d-relations. Furthermore, it makes it possible to limit the number of nodes for which the d-relation is determined. This can greatly reduce the running time for large networks.
Figure 7 shows the result of selecting the "Show D-Separation" operation on the chest clinic example with the configuration described here.
The "Configure D-Separation" operation creates a custom configuration which is used when selecting "Show D-Separation". Selecting the operation brings up a configuration pane where the source (Figure 3), target (Figure 4), and instantiated (Figure 6) nodes can be defined.
Note, that the current d-separation configuration is saved. This means, that even if the network is edited and recompiled, the configuration is still kept. Obviously, the configuration is also kept if the network is saved and reloaded.
Figure 3: The source definition. Here we choose to use the same node as source, each time the operation is performed. |
When defining the source node, it can be chosen to:
Figure 4: The targets definition. A custom set of nodes are chosen as targets. |
When defining the target nodes, each available group (including the "no group") can be chosen as target. However, it is also possible to define a custom group. If this is chosen, all currently selected nodes can be added to the custom group by choosing "Add selected" (note, that it is possible to change the selection while the configuration window is open). Nodes can be removed by selecting one or more nodes and pressing "Remove", and nodes can be added by pressing the "Define" button. This will bring up the "Custom Group" panel (displayed in Figure 6), which allows for easy selection of any number of nodes.
Figure 5: The custom group panel, which shows the available nodes to the left, and the selected nodes to the right. |
Note, that nodes selected as either source or instantiated nodes are not accessible from the "Custom Group" panel.
Figure 6: The instantiated nodes definition . All nodes which do not belong to a group will be considered as instantiated. |
The definition of the "Instantiations" works in the exact same way as the definition of the "Targets".
The result of selecting "Show D-Separation" with the above depicted configuration is shown in Figure 7:
Figure 7: The result of performing "Show D-Separation" on the chest clinic example . |