In this exercise, we will learn the parameters of a Bayesian network from data stored in a Microsoft Sql Server Express database.
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 Bayesian network can be constructed manually in Exercise - construction.
Click the Parameter learning button on the Data tab on the main 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, 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.
Click Ok in the Data Map window, which will launch the Parameter learning window.
Click the Start button. When learning has completed, dismiss the message box. The Parameter learning window should look something like the image below:
Because the data used for learning includes missing data, your results may differ slightly.
Click the Apply button, on the parameter learning ribbon toolbar. This will launch the Candidate networks window.
Click the Ok button on the Candidate networks window, which will set the new distributions on the network.
Select a node, and then click the Distribution button on the Network tab on the main ribbon toolbar.
Inspect the new distribution that has been learnt.