GUI for OpenBayes

[Kevin Murphy, 11 August 2001.]

Many users want to be able to create a model interactively using a GUI (manually positioning the nodes and arcs). However, other means of specifying the network should also be provided, since regular graph structures (e.g., chains or grids) are best made by using a program (e.g., calling the API inside a for-loop).

In addition to graphical input, we need graphical output, i.e., a way to automatically layout a graph structure (e.g., a graph created by structure learning or by reading a file, or to visualize a junction tree). The open-source GraphViz library from AT&T is designed for exactly this purpose. There is also an expensive commercial product, made by Tom Sawyer, which does the same job. (What makes this interesting is that Intel owns the rights to redistribute the Tom Sawyer code in binary form...)

The output of the graph visualizer should be easy to edit, both to fix errors made by the layout heuristics, and to make it easy to specify changes to the model. The resulting modified graph should then be usable as if it had been created using the GUI. Hence the graphical input and output programs need to be integrated. One proposal is to use Grappa, part of GraphViz, to do this. (Grappa is written in Java.)

We need a way to specify the parameters of a model, as well as its graph structure. One approach would be to implement a method for each class of conditional probability distribution (CPD) such that, if you click on a node on that type in the GUI, it allows you to enter the parameters by some means, e.g., by typing in numbers, or using a slider bar. (Of course, we should also be able to specify parameters using the API and the file parser.) Similarly, each CPD should implement its own visualization method, such that, if you click on the node on the graphical output, you can view its parameters, e.g., a multinomial's paramters might be displayed by a histogram, a decision/regression tree CPD should be displayed as a tree, and a 2D Gaussian's using an ellipse. The visualized output of the parameters should be editable in the same way that the graph structure was. By default, all CPDs can use a simple text edit box to input/output their parameters. The best way to specify parameters for undirected graphical (clique potentials) is not clear.

Once we have created the graph structure, we need to be able to store layout/appearance information for future use. This could be done in a separate file from the one used to specify the model's structure and parameters (see file formats), or they could be integrated into one file.

In addition to model specification/visualization, we can imagine making the GUI a "master", and the API/kernel (where all the computation happens) a "slave" (Kathy Laskey has objected to this design, however). Beginning users would never need to type anything. They would enter evidence and then select the query nodes, click 'go', and then visualize the resulting marginals. (A similar setup could be used for decision making.) For learning, the user would select a data file and maybe specify an initial graph/params in the GUI, click on a 'learn' button, and then visualize the resulting learned graph/params.

Bob Davies [bdavies@intel.com] is currently implementing a GUI using Visual Basic on top of Tom Sawyer, and will integrate it with BNT. Hao Wang [wanghao_buaa@yahoo.com], of Intel China, is currently implementing a GUI in Matlab for BNT. Both of these approaches have problems. So we still need someone to implement a GUI using Graphviz. Robert Dodier [RobertD@athenesoft.com] said he will lead such an effort, but it is not clear how much time he has to spend on it. Rockwell Science Center has developed a product called IPARP, for military pattern recognition problems. IPARP uses BNT, and includes a good Matlab GUI (click here for MS Word documentation, complete with color illustrations). This is the kind of thing I would like to see implemented in the public domain.

I think we should tackle the GUI in the following order (most important feature first):