Tutorial 9 - Discovering insight

In this tutorial we use a Comparison query to discover insight from a network.

The following concepts will be covered:

  • Comparison query
  • Base evidence
  • Difference and lift

Bayes Server must be installed, before starting this tutorial. An evaluation version can be downloaded from the Downloads page

Companion video (No Audio)

Open the model

We will use the Asia sample network installed with Bayes Server.

  • Launch Bayes Server, and on the Start page click the network entitled 'Asia' in the Sample networks pane.

If the Start page is not set to display on start up, or has been closed, click the Start page button, on the View tab, General group.

Asia network

Comparison query

In order to discover insight about Smokers we will use a Comparison query.

We could also use Auto insight to automatically extract insight and dynamically drill down to finer grained insight.

Set base evidence

  • Click the check box in the Smoker node next to the state False. Evidence is now set to Smoker=False.

    In order to highlight insight about smokers we will compare Smoker=True to Smoker=False. In this case Smoker=False is the base evidence. We do not compare Smoker=True to the case when Smoker has no evidence set, because it would then be biased as the comparison would be against both Smokers and non Smokers.

    If the node of interest has more than two states, set evidence to exclude the state you want insight about using Soft evidence.

    For example, if you have a node 'Hair Length' with states {Short, Medium, Long} and you want to discover insight about the state 'Long', then set soft evidence on the node to {1, 1, 0} to exclude the state 'Long'. This can be done in the Evidence window, or by holding down the Alt key when clicking the state to exclude (e.g. 'Long').

    Comparison query

  • To capture this evidence as base evidence, click the Capture base evidence menu item, from the Base evidence button , which can be found on the Query tab of the main ribbon toolbar.

Comparison query

  • Change the evidence to Smoker=True, so that we can highlight insight about how a smoker differs from a non smoker.

  • Change the Comparison drop down to Difference on the Query tab of the main ribbon toolbar.

    Difference will favour changes in probability that have greater overall chance of occurring, whereas Lift will favour relative changes without regard to the overall chance of them happening.

  • Click the Run button on the network viewer to query all nodes, or use the keyboard shortcut F6.

    The result should look like the image below.

    Difference comparison query

    This shows that 'Has Bronchitis' and 'Dyspnea' provide us with the greatest insight.

  • Change the Comparison drop down to Lift on the Query tab of the main ribbon toolbar.

    Now 'Has Lung Cancer' and 'Has Tuberculosis or Cancer' show the strongest insight, but when lift is used the overall chance of these influencers occurring is not taken into account.

Automated insight

Using a comparison query gives you ultimate flexibility, however using Auto Insight provides a quick and dynamic way of discovering insight.

First, remove the comparison query we created in the previous section.

  • Change the Comparison drop down to None on the Query tab of the main ribbon toolbar.
  • Click the Reset base evidence menu item, from the Base evidence button , which can be found on the Query tab of the main ribbon toolbar.
  • Remove the evidence set on the Smoker node by un-checking True.

We are now in the same state as when we opened the network.

  • Click Auto Insight on the Analysis tab of the main ribbon toolbar.

This will launch the Auto Insight window.

  • Change the Target variables drop down to Smoker as this is the variable we are analyzing.
  • Click the Calculate button.

The insight displayed is ranked in order of importance.

We can also dynamically drill down into the results.

  • Click the row Has Bronchitis = False to dynamically condition the analysis on patients who do not have Bronchitis.

The auto insight window should look like this:

Auto insight