Bayesian Belief and Decision Networks |
|
Both this tutorial and the previous have used the Basic Fire Alarm Problem to demonstrate the basics of querying graphs. This tutorial will cover Verbose Query Mode, and the extra information it conveys. Below is a simplified version of the main Bayes Applet, with the Basic Fire Alarm Problem already loaded. When you load a pre-existing graph, the applet automatically enters 'Solve' mode, in which you perform queries and make observations. To modify the graph, click on the tab marked 'Create' to return to create mode. The applet below does not have a full set of controls enabled.
This time, the applet is in Verbose Query Mode. When you query a node, a new window will open that contains a copy of the graph. The node you chose to query will now have a thick green border around it, and lines will have appeared, joining the parents of any node that are not already joined.
On the left hand side of the query window, you will see two lists of factors: current and eliminated. The list of eliminated factors should be blank. If you double-click the name of any factor, another new window will open. The text at the top of the window will read 'Inspecting factor', and beside it will be a drop-down menu with the name of the factor you chose to inspect, selected. If you select another factor from that menu, the window will change and you will see the values for the new factor. On the right hand side of this window will be a series of buttons, directly underneath the word 'Value'. Click on any one of those buttons to see how the value was calculated. Unless you have already started eliminating variables, all of the buttons should tell you that the value was calculated from the probability table of a particular variable. These windows can be closed by clicking 'OK'. When you have finished inspecting the factors, return to the query window.
There are two ways in which you can choose variables to eliminate. The first way is to select a heuristic from the drop-down menu below the lists of factors, and allow the variables to be automatically selected. The 'Auto-eliminate' button will eliminate all the variables in the order specified by the heuristic. The 'Step' button will eliminate a single variable each time you press it. Once you have chosen a heuristic and begun the elimination, you cannot choose a different heuristic. To perform variable elimination with a new heuristic, you will need to query the node again.
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. You should see a new factor at the bottom of the 'Current Factors' list, and the variables in that new factor should all be joined if they weren't already. Once all the variables have been eliminated, the only factor remaining will be the answer. A window will also open up giving you the query results. This is the same window you would get if you were querying the node in Brief Query Mode.
Also, the two variable elimination methods are incompatible - if you begin eliminating variables one way, you cannot continue eliminating them another way.
Finally, to improve the efficiency of your query, you can prune irrelevant variables from the graph. There is a button at the bottom left of the window, with the label 'Remove irrelevant variables'. When you press this, any variables that do not affect the probability of the query node will be pruned, and treated as having been eliminated. You can only do this at the start of the query, before you begin eliminating variables yourself. The irrelevant variables are chosen according to the definition of conditional independence. An algorithm that implements the criteria for d-separation is used. For more information about d-separation and the conditional independence quiz, continue to the next tutorial. Otherwise, you've now covered the basics of graph creation and querying. You're done!