Belief and Decision Networks
The Bayesian Belief and Decision Networks applet is a tool to visually solve Bayesian Nets. It has a robust variable elimination algorithm, and allows users to create their own networks and customize the domains and probabilities. The applet has features that allow the user to inspect probabilities, make observations, and monitor nodes. It also allows the user to manually do variable elimination and to inspect the factors created.
The applet also has features to add no-forgetting arcs. There is an independence quiz mode that tests the user on his or her knowledge of the independence rules of Bayesian Nets.
The File Menu
The File Menu has options to create graphs, load files, and save files, as well as quitting the program.
The Edit Menu
The Edit Menu allows the user to view a text representation of the network.
The View Menu
The View Menu allows the user to modify the appearance of the applet.
The Network Options
The Networks Options menu allows the user to change how queries and monitoring are done by the applet. Also, it has options to hide or show decision network options.
Create Mode allows the user to define a Bayesian Network manually (belief and decision nets, depending on whether the Decision Net Controls are on). Keep in mind that node names should be unique.
Solve Mode allows the user to query nodes' probabilities, either by automatically doing the variable elimination, or by letting the user manually do the elimination. It provides functions to observe nodes, and monitor the probabilities. Solve mode also allows the user to optimize decision networks.
The Verbose Query Window allows the user to manually execute variable elimination. It has a large canvas area to the right and a control panel on the left.
The canvas area displays the current network. The color and shape cues for the network are the same as the main applet window, with some differences. A green coloured node indicates that that node is the node being queried. When optimizing a decision network, the utility node is green.
The left side panel contains two lists of factors. The 'Current Factors' list indicates the factors that represent the current graph. The 'Eliminated Factors' list indicates the factors that have been eliminated from the Current Factor list. You can inspect factors and see their tables by clicking any factor in the list. When optimizing a decision network, there will also be a list of decision functions below the two factor lists.
There are five stages in the process of completing a query: 1) pruning irrelevant variables, 2) projecting observations, 3) eliminating variables, 4) multiplying final factors, and 5) normalizing final factors. These stages must be completed in order, although stages will be automatically skipped under certain conditions (for example, if there are no observations step two will automatically be skipped). These stages are listed on the left panel of the query window, and your current progress through the stages can be determined by the state of the buttons under each stage description.
It is possible to advance through the stages either by using the buttons on the left panel, or by directly interacting with the graph. You can interact with the graph by right clicking on the canvas and selecting an action, or by left clicking on nodes. Left clicking on a node has different behavior depending on the stage that you are in. For example, clicking on an observed node while you are in the "Project Observations" stage will project the nodes observation. You can rearrange the graph to make it easier to read by dragging nodes and using the autoscale option (right click on the canvas and select "Autoscale").
During the "Eliminate Variables" stage, there are two ways in which you can choose variables to eliminate. The 'Auto-Eliminate' button will eliminate all the variables in the order specified by the heuristic which is specified by the drop down menu next to 'Heuristic:'. The available heuristics are 'Max-Cardinality', 'Min-Degree', 'Min-Factor', 'Min-Fill', 'Random', and 'Sequential'. The 'Eliminate Next' button will eliminate a single variable each time you press it. The second way to choose variables to eliminate is by clicking on them directly. When you eliminate a variable, it will be greyed out, and the lists of current and eliminated factors will be updated accordingly.
When the user clicks on a factor in the Verbose Query Window, the Inspecting Factors window is displayed. Here, the probability table for the factor is displayed.
The central area of the window is dominated by the factor table, displaying all possible combinations of the domains of all the variables, and their corresponding probabilities/values. The user can click on the value button to display how the probability/value is derived.
A choice box on the upper-right corner of the window allows the user to switch the view to another factor. There is also a 'Reorder Variable' button on the upper-left corner of the window that allows the user to rearrange the order of the variables that appear in the Inspecting Factors window. This is sometimes used to make it easier for the user to visually inspect variables.
The Independence Quiz Window tests the user's knowledge of the conditional independence rules in a network.
The Quiz Window has a large right canvas which displays the current network. Their are two modes which can be changed by clicking on the the tab at top, right hand side. You can either 'Quiz Yourself' by asking user questions or 'Ask the Applet' to create a question to ask the applet .
To quiz yourself, click on the tab 'Quiz Yourself'. Click on 'Answer a Question' to ask the applet to pose an independence question to the user. Click either true or false to give an answer, or click 'Get Answer' to ask the applet to solve the question. The window will keep track of the user's score for the duration of the session.To ask a question, click the 'Ask the Applet' tab. Click on the 'Ask a question' button on the left control panel. Click nodes in this order:
[1st node] is conditionally independent of [2nd node] given [3rd node] and [4th node] and .... and [nth node]?
Click at least two nodes to form a complete question. Click 'Get Answer' to let the applet answer the question.
Autoscale works the same way as the autoscale button in the main applet window. It rearranges the displayed network so that they fit optimally in the viewable area of the canvas.
The applet can read an XML representation of a Bayesian Network called the XMLBIF format. The application version of the applet saves networks in this format
The DTD for XMLBIF is as follows:
<!DOCTYPE BIF [ <!ELEMENT BIF ( NETWORK )*> <!ATTLIST BIF VERSION CDATA #REQUIRED> <!ELEMENT NETWORK ( NAME, ( PROPERTY | VARIABLE | DEFINITION )* )> <!ELEMENT NAME (#PCDATA)> <!ELEMENT VARIABLE ( NAME, ( OUTCOME | PROPERTY )* ) > <!ATTLIST VARIABLE TYPE (nature|decision|utility) "nature"> <!ELEMENT OUTCOME (#PCDATA)> <!ELEMENT DEFINITION ( FOR | GIVEN | TABLE | PROPERTY )* > <!ELEMENT FOR (#PCDATA)> <!ELEMENT GIVEN (#PCDATA)> <!ELEMENT TABLE (#PCDATA)> <!ELEMENT PROPERTY (#PCDATA)> ]>
This is an example XMLBIF (the fire alarm problem from the applet):
<BIF VERSION="0.3"> <NETWORK> <VARIABLE TYPE="nature"> <NAME>tampering</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (-148.1863, -197.12207)</PROPERTY> </VARIABLE> <VARIABLE TYPE="nature"> <NAME>fire</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (67.29127, -200.31433)</PROPERTY> </VARIABLE> <VARIABLE TYPE="nature"> <NAME>alarm</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (-46.03397, -61.451008)</PROPERTY> </VARIABLE> <VARIABLE TYPE="nature"> <NAME>smoke</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (158.27069, -67.83553)</PROPERTY> </VARIABLE> <VARIABLE TYPE="nature"> <NAME>leaving</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (-44.437843, 74.22005)</PROPERTY> </VARIABLE> <VARIABLE TYPE="nature"> <NAME>report</NAME> <OUTCOME>T</OUTCOME> <OUTCOME>F</OUTCOME> <PROPERTY>position = (-42.841713, 200.31433)</PROPERTY> </VARIABLE> <DEFINITION> <FOR>tampering</FOR> <TABLE> 0.02 0.98</TABLE> </DEFINITION> <DEFINITION> <FOR>fire</FOR> <TABLE> 0.01 0.99</TABLE> </DEFINITION> <DEFINITION> <FOR>alarm</FOR> <GIVEN>tampering</GIVEN> <GIVEN>fire</GIVEN> <TABLE> 0.5 0.5 0.85 0.15 0.99 0.01 1.0E-4 0.9999</TABLE> </DEFINITION> <DEFINITION> <FOR>smoke</FOR> <GIVEN>fire</GIVEN> <TABLE> 0.9 0.1 0.01 0.99</TABLE> </DEFINITION> <DEFINITION> <FOR>leaving</FOR> <GIVEN>alarm</GIVEN> <TABLE> 0.88 0.12 0.0010 0.999</TABLE> </DEFINITION> <DEFINITION> <FOR>report</FOR> <GIVEN>leaving</GIVEN> <TABLE> 0.75 0.25 0.01 0.99</TABLE> </DEFINITION> </NETWORK> </BIF>
A more extensive introduction to the Interchange Format for Bayesian Networks can be found at http://www-2.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/
|Main Tools: Graph Searching | Consistency for CSP | SLS for CSP | Deduction | Belief and Decision Networks | Decision Trees | Neural Networks | STRIPS to CSP|