Contents   |   Previous   |   Next


2. GUI Help

System Overview

Bayonet System offers the feature rich, user friendly GUI. An overview of the GUI is given below.


The above picture shows clearly,
  1. Menu
  2. Toolbar
  3. Information panel
  4. Editor
  5. Message/Macro panel
  6. Status bar

Menu

The standard menu is displayed on top of the window of Bayonet system. It includes all the basic operations required to create project, edit the network and save the file. Each menu command is described below.

File

  New Creates new project
  Open Opens an existing project
  Save Saves the current project using the same filename
  Save As Saves current project to a specified file name
  Save Net File Saves the project as a Hugin .net file
  XML-Export XML Exports the project to an XML file
  XML-Import XML Imports the project from an XML file
  Close Closes the current project
  Exit Exits Bayonet

Edit

  Create Node Creates new node
  Create Link Creates a new link
  Remove Node Removes the selected node from the network
  Remove Link Removes the selected link from the network

Tool

  Property... Opens up the Property dialog to set user preferences

Wizard

  Data Preparation Wizard... Leads to prepare the data for constructing a bayesian network. This involves guided steps to open a database or data file, select and edit the data and export to a text file if required.
  Model Construction Wizard... Leads to construct a bayesian network from experience data. This involves guided steps to load data, select attributes, specify preferences and get a model constructed accordingly.

Help

  Help Opens the help file for Bayonet system
  About Displays the information about the Bayonet system

Tool bar

Bayonet system provides a toolbar which helps for quick access to many functions. It is displayed just under the main menu. The buttons on the toolbar is explained below.

From left to right the buttons on the toolbar are,
  1. New bayonet project
  2. Open bayonet project
  3. Close bayonet project
  4. Save bayonet project
  5. Create Node
  6. Create Link
  7. Add Tree
  8. Remove Tree
  9. Previous Tree
  10. Next Tree
  11. Create CPT
  12. Create CPA
  13. Play Macro

Information Panel

The information panel in the Bayonet system provides the information regarding the various objects of the bayesian network model constructed using the system. For example, in the above picture showing an overview of the system, we can view system information panel for the model displayed in the editor.
Information panel has the tabs,
  System An explorer for the bayonet system
  Project Displays the information about the current project
  State View or edit the state properties for the selected node
  Node View or edit the properties of the selected node
  Tree View the information of the selected tree
  DST Create a DST for a tree and export to CPT
  CPT Create, export or import CPT. Normalise the table and find log likelihood
  Tree Selector Watch all possible trees, Select an algorithm and find the best tree
  CPA
  Path

Editor

The editor is the canvas where we view and edit the model of the bayonet system. On top of this are the tabs displaying all opened projects. We can switch between projects by selecting the tab. The selected project becomes the current project. All operations are related to the current project.

Message panel

The messages on operations and the macro for the commands can be viewed in the message panel of the Bayonet System. Right click on this window to save or clear these messages and macros.

Status bar

From left to right, on the status bar are respectively,
  Message panel icon Opens up the Message panel at the bottom of the Bayonet System. Click on this icon to open or hide this panel.
  Zoom panel icon Opens up the Zoom panel at the top of the Bayonet System. Click on this icon to open or hide the zoom panel.
  Progress message and bar The message regarding the progress of the system is displayed here. The next is the progress bar, visual indication.
  Modified staus The information whether anything is modified in the system.
  Coordintes The cursor coordinates in the edit window.

GUI Operations

Project

Create new project

You can create a new project using the menu, File-New. This opens up a dialog box where you can specify the name, path and description of the project. The newly created project becomes the current project. The system displays the editor for the current project, where you can create or edit the bayesian network.

Load project

Use File-Open menu to load existing project. This loads the selected project (.bnp file) and makes it current project.

Save project

Select File-Save menu item to save the project. On saving the project successfully, you will get a message saying that the file is saved.

Save Net File

Select File-Save Net File menu item to save the project as a Hugin .net file. On saving the .net file successfully, you will get a message saying that the file is saved.

Close project

You can close the current project using the menu File-Close. If there are any modifications exist, the system prompts you for saving the changes before closing the project.

You may want to know the toolbar shortcuts for the project related operations.

Node

Create new node

It is possible to create two kind of nodes (Discrete, Discrete Continuous) in the Bayonet System. Righ click on the editor and select 'Create Node' from the pop-up menu to create a DNode (Discrete Node).

A new node can also be created using the menu, Edit-Create Node. This opens up a dial box where you can specify the node properties. Here, you can change the default type of the node (DNode) to DCNode(Discrete Continuous Node) if you want.

Select nodes

Click on a node in the editor to select a node. To select multiple nodes, click on the editor and drag over the mouse covering the nodes you want to select.

Connect two nodes

Right click on the editor and select 'Create Link' from the pop-up menu. Now click on the first node and while holding the mouse button click on the second node to create the link from fisrt node(parent) to the second node(child). This automatically adds tree to the child node if currently there is no tree on the node. So, this is a quick way of connecting two nodes. You can also use the following methods to connect nodes.

Connect multiple nodes

To connect multiple parent nodes to a child node, first select all the parent nodes. Then, right click on the editor and select 'Link' from the pop-up menu. Now click on child node.

Another way to connect mutiple nodes is to create tree for the child node and selecting the parents. In this method, first add tree to the child node by right clicking on the node and selecting 'Add Tree' from the pop-up menu.

Then, select 'Create Link' from 'Edit' menu which opens up a dialogue box for selecting the end (child) and start (parent) nodes.

Remove node

Right click on a node and select 'Remove Node' from the pop-up menu to remove a node. This automatically removes any link to the node.

Remove link

To remove any link for a node, select 'Remove Link' from the 'Edit' menu. On the dialogue box displayed, select the node, tree and the parent node and click 'Remove'.

Toolbar shortcuts are available for creating node and link.

State

State properties for a node can be updated in the State tab on the information panel. Select the node for which the state properties should be changed and click on 'Update' button in the State tab. You can add or delete states and update the state name in this window.

By default the states are one dimensional. To modify the dimension of the states select the Node tab and update the dimension property of the node.

Tree

Add tree

You can add a tree to a node by right clicking on the node and selecting 'Add Tree' from the pop-up menu. You can notice the the value of 'T' displayed above the node is increased by one after adding a tree.

Clone tree

'Clone Tree' operation is available on the pop-up menu on right clicking on a node. This can be used when you want to create the same tree structure as the current tree on the node.

Create all trees

To create all possible trees for a set of nodes, follow these simple steps. First, select all the possible parent nodes. Then, right click and select 'Create All Possible Trees' from the pop-up menu. Now, click on the node which should be the child node. Now you have got all the possible trees for the selected parents and child. The list of trees are displayed in the 'Tree' tab on the information panel. You can view the trees by selecting one by one.

Current tree

You can select previous or next tree from the list of trees on a node and make it the current tree. For this, select 'Previous Tree' or 'Next Tree' from the pop-up menu displayed on right clicking on the node.

You can also view the list of trees for a node from the 'Tree' tab on the information panel. Select the node for which you want to see the trees and select the 'Tree' tab.

You may find the toolbar shortcuts helful for the tree related operations.

CPT

Create CPT

Select the CPT tab on the information panel to create CPT for a selected tree. Select the CPT type and click on 'Create' to create CPT. Then click on 'Reconstruct Table' to enter values.

Remove CPT

You can remove CPT by clicking on the 'Remove' button displayed on the CPT tab in the information panel.

Normalise CPT

You can enter just the numbers for the states and make Bayonet System normalise the probability for you. For example if you have a CPT table entered as 2 and 8 for a state of the parent and don't enter for other state (the missing values are displayed as 'miss'), the normalisation process makes the values for the states to be 0.2, 0.8 and 0.5, 0.5 respectively.
Click on the button 'N' to normalise the data.

Look at the sample data before normalising and after normalised and entropised.
Before Normalised

After Normalised and Entropised.

Entropise CPT

Bayonet System calculates the entropy values and displays at the bottom of the CPT table, when you click on the button 'E'.

Import / Export CPT

The CPT data can be imported from or exported to a CSV file for making the data entry easy.

Bayonet System can learn using the experience data kept in any RDBMS that can be connected using JDBC. Please refer to the section DST and the tutorial on the chapter 4 for more details.

Tree Selector

Bayonet System offers algorithms for selecting the best tree from the list of trees on a node. It's based on the CPT table constructed for each tree. Let us look in detail about the tree selecting process.

In order to understand the tree selector easily, let us take an example as described below.
Assume that we have to construct simple bayonet with three nodes, one child (Child) and two parents (Parent1, Parent2). We have three possible trees. Construct all the three trees. Enter CPT values for each tree, normalise the CPT data and entropise them. The tree structure and CPT data will look like in the following pictures.

The tree with the child node and both parents.


The tree with child node and Parent1.


The tree with child node and Parent2.

Now, select the 'Tree Selector' tab on the information panel. Select one from the Tree Selector List and click on 'Select' button. This selects the best tree based on the selected algorithm from the list of trees. The best tree and the best value is displayed.

You can watch all trees on clicking the 'Watch All Trees' button. This brings up a dialogue box where you can start or stop the animation of trees.

DST

The 'DST' tab on the information panel helps you getting the data from experience table to CPT. Create the tree with all possible parent nodes. Then you can assign all parent nodes and child node to a column value in the experience table and calculate the CPT values.

You will find the learning process easy and very useful which is explained below.

Create DST

In order to create DST, select a node with at least one tree in the project. Then select the DST tab from the information panel. The list of database types and create button are displayed.

Select the database type and click on 'Create' button.

Connecting to database is the next step. If you have selected File DST in the previous step, now you need to give the file information. Click on the search button next to the 'File data' text box to select the CSV file containing the data.

If you have selected Database DST, by default the system reads the information specified in the DB properties and displays the database information. Modify the database connecting information if required. Click on 'Connect DB' button to make a connection to the database.
(Note: The database and the JDBC driver should be setup and working properly. You can add or modify the DB properties in the file, Bayonet system directory/ properties/ xml/ db/ db.xml)

Select the table from the database. The list of items from the selected table(s) are displayed. Now you can assign item to node. To assign the item to the appropriate node, press the right mouse button on an item in the item list and forward the item to the appropriate node on the popup menu.
The System updates the input and output information (parent and child nodes) when the items are assigned to nodes.

After assigning the items for all nodes, click on 'Update DST' button and then 'DST to CPT' button. The system counts the repetition of values for each item and prepares the CPT values.

Now, you can watch the CPT data updated in the CPT information panel.



Contents   |   Previous   |   Next