In this exercise, we will use Data explorer to set evidence on a Bayesian network, and run multiple queries via the Batch Query window.
1 - Bayes Server
Bayes Server must be installed, before starting this walkthrough.
An evaluation version can be downloaded from the Bayes Server website.
2 - The Bayesian network 'Identification Extended'
This network is available, from either:
The SampleNetworks folder, that is packaged with the course help
By working through Exercise - construction.
3 - Sql Server Express Database
A Sql Server express database (2008 or later) must be installed, before starting this walkthrough.
The database must be setup (once) using the database script that accompanies the course notes.
4 - Data Connection
A data connection to the BSTRX database must have been created. See Exercise - Data Connection.
Open the Bayesian network
Launch Bayes Server and open the Bayesian network IdentificationExtended.bayes located in the SampleNetworks folder, that is packaged with the course help.
Alternatively the network can be constructed manually in Exercise - construction.
Open Data Explorer by clicking the Data explorer button on the View tab of the main ribbon toolbar.
Click the Load button on the Data Explorer ribbon toolbar. This will launch the Data Selection window.
Select the data connection named localhost\sqlexpress (BSTRX) set up in Exercise - Data Connection in the Data Connection drop down.
Then set the table in the Data drop down to IdentificationExtended.
Click Ok. This will launch the Data Map window.
In the Data Map window, leave the default mappings as shown below.
Click Ok in the Data Map window.
Data Explorer should now look like this.
Double click on a row of data in Data Explorer, and notice how the data is set as evidence on the Bayesian network.
Press the keyboard shortcut F6 to query all nodes.
Now try double clicking different rows of data in Data Explorer, noticing how the Bayesian network and associated queries are updated.
Open the Batch Query window by clicking the Batch Query button on the Data tab of the main ribbon toolbar.
This will launch the Data Selection window. Ensure that the Data Connection is set to localhost\sqlexpress (BSTRX), and the Data dropdown is set to IdentificationExtended.
Click the Ok button on the Data Selection window, which will launch the Data Map window.
Clear the mapping for the Gender variable, leaving the default settings for the other variables.
To clear a mapping for a variable click the Eraser button next to the variable.
If the Weight drop down has been automatically mapped to the Weight column, set it to map to nothing.
It is important to clear the weight mapping, as the Weight drop down is used to assign a case weight, which is unrelated to the weight variable in our network.
The Data Map window should now look like this.
Click the Ok button on the Data Map window. This will launch the Batch Query window.
Click the checkbox next to the following items in the pane on the left of the Batch Query window.
Click the Start button. The Batch Query window should now look like this.