Bayesian Belief and Decision Networks

applet home
help contents
quickstart
general help
tutorials
 

 

Tutorial 1: Creating A New Graph

If at any point, you would like to reset the applet and restart the graph creation process from scratch, simply select 'Create New Graph' from the 'File' menu. If you have just started the applet, or started to create a new graph, the screen should look like the one shown below:



The applet automatically begins in 'Select' mode. You can tell which mode the applet is in by looking at the set of options on the left hand side of the screen. To create a new node, click the button next to the words 'Create Node'. The text at the bottom of the white canvas, underneath the dotted lines, should now read 'Click on the canvas to create a node'. Click anywhere on the canvas, and you will see the following dialog box:



Enter a new name if you like, by typing it into the box beside the words 'Node name'. To add new values to the domain, enter a new value into the box beside the words 'Value to add to the domain', and click the button marked 'Update' to save your changes. You should see the new domain, including the value you've just added, on the upper right corner of the window. To clear the domain, click the button marked 'Clear Domain', but keep in mind that a node is not allowed to have an empty domain, and you will get a warning if you try to close the box without adding new values. When you have finished editing the properties of the new node, click 'Done' to close the box and save your changes. The node you've created will have appeared at the spot where you clicked.

Create a few more nodes if you like. To join them together, you will have to add edges. Click on the button next to the words 'Create Edge'. To begin creating an edge, click on a node. To place the other end of the edge, click on a different node. You will now see an arrow between them, pointing from the first node to the second node. Be careful with edge creation, however, since Bayesian Networks cannot have cycles.

After creating a few more nodes and edges, your graph might look something like this:



However, the reason we use Bayesian networks is to model probabilistic inference, and the graph wouldn't be very interesting if we couldn't set prior and conditional probabilities. To set the probability table for a node, click the button beside the words 'Modify Probability Table', and then click on any node in your graph. A new window will open showing the possible probability contexts for this node, and you can now set the probabilities for each domain value, given those contexts. For example, the unmodified probability table for 'another variable' in the example graph looks like this:



Enter some new probabilities, keeping in mind that the probabilities in each row must add up to 1, and the applet does not allow probabilities greater than 1 or less than 0. When you are finished, click 'Done'. Modify the probability tables for your nodes as you please. When you are finished, you are ready to query your graph.