-
Notifications
You must be signed in to change notification settings - Fork 1
Dazzle Documentation Editor
One of the editors developed with Proxima is an editor for documenting Bayesian networks. The prototype editor is written in about 700 lines of mostly straightforward code.
For the discussion here, it suffices to regard a Bayesian network as a directed acyclic graph that is documented by describing small parts of it in separate sections or subsections that are accompanied by a picture of the corresponding part of the network. The documentation also contains a picture of the complete network.
The screenshot below shows a Bayesian network for determining the stage of oesophagus carcinomas.

The network is fully editable, but it can also be imported from the Bayesian network tool Dazzle.
The documentation for a small part of the network, dealing with lymphatic metastases, is shown in the next screenshot.

With an ordinary word processor, it would be difficult to keep this documentation consistent with the main network. Changes to a network node require changes to the picture of the main network as well as the pictures in sections that refer to the node. Furthermore, the text needs to be checked for consistency. This process turned out to be infeasible when the networks reached a certain size. However, the subgraph in the Proxima editor is an editable view on the actual graph. Hence, any changes to the subgraph are automatically incorporated in the supergraph (and vice versa). If we add, for example, an arrow between Metas-longen and Metas-lever in figure 3, the same arrow appears in the lower-right corner of figure 1 (with a different orientation, since Metas-longen is to the right of Metas-lever in figure 1.)
Corresponding fragment of fig 1:
When part of the text refers to a specific node, this can be made explicit by adding a tag of that node (the yellow words in the screenshot). If the node corresponding to the tag is removed or renamed, this is signaled with a squiggly line. For example, if we delete the node Metas-lever, the tag becomes:
Besides the graph facilities, the editor provides functionality for references to sections and figures. The blue numbers (e.g. ) are generated, and the superscript shows the (editable) label of the section or figure that is referred to.
A future version of the editor will also issue a warning that text referring to a certain part of the network must be checked after that part has been edited (click to enlarge).
Each node in the network has a number of possible values, and an associated probability table. The probability table specifies the probability of each value, given the values of the parent nodes in the network. Values and probabilities are documented in a separate subsection for each node. For the node Echo-endo-loco we have:

The table itself is a generated automatically, with its structure depending on the number of parents of the node and the numbers of values of the node and its parents. For each combination of values of the node and the parents, a row is created in the table. The probabilities in the column on the right are editable.
For a each combination of parent values, the sum of the probabilities for the values of the parent must be 1.0. In the screenshot, the green squiggly signals that this is not the case for value moeite of Metas-loco and value nee of passage. The sum of the probabilities for the different values of Echo-endo-loco is 0.11 (ja) + 0.86 (nee) + 0.003 (niet-gedetermineerd) = 0.973.
In the last line, the red squiggly signals a parse error in the probability field.
-- Main.MartijnSchrage - 21 Jul 2008