Causal AI | Optimization tutorial
In this tutorial we demonstrate the process of evidence optimization where some of the inputs are interventions.
For more information on Causal Optimization and Causal AI in general, see the article Introduction to Causal AI.
Open the model
We will use the Causal Optimization Simple sample network installed with Bayes Server. This is a simple healthcare model, which models the probability of recovery depending on whether a patient is treated with DrugA and/or DrugB, or neither.
Treatment with DrugA and/or DrugB are interventions, so we need to perform Causal optimization in this case.
Note that if we were to perform a non-causal optimization, the recommendation would be NOT to treat the patient with either drug, which is incorrect.
- Launch Bayes Server, and on the Start page click the network entitled 'Causal Optimization Simple' 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 Application tab.
Launch the optimizer
- Select the Causal toolbar tab, click Causal Optimizer and choose Maximize.
Note that we can maximize, minimize and goal seek the output of discrete and continuous variables, but also function nodes, which can be arbitrary expressions.
- In the Variable Selector dialog, ensure both DrugA and DrugB are selected as shown below. These are the variables which are potential interventions.
- Click Ok.
Objective Definition
In the Objective Definition page, change the following:
- Target / Objective = Recovered
- Target (Objective) state = True
The page should look as follows:
- Click Next
Design Variables
- Remove Comorbidity from ths selected design variables.
The page should look as follows:
- Click Next.
Design Variable Configuration
- Ensure both DrugA and DrugB have the value Do for the Intervention column.
Do is another term used to indicate that this is an intervention.
The page should look as follows:
- Click Next.
Design State Configuration
- Leave the default values.
The page should look as follows:
- Click Next.
Optimization Algorithm
- There is currently only one option, so click Next.
Inference Algorithm
- Ensure the Relevance Tree algorithm is selected.
- Click Next.
For this model, although Commorbidity is a confounding variable, it is not unobserved, so we can use the Relevance Tree algorithm. If Commorbidity was an Unobserved Confounder we would need to use a different algorithm.
Options
- Leave the default options
- Click Next.
Run
- Click Run to start the optimization process.
- When complete, the Optimization Candidates page will automatically be displayed.
In the run shown below, note the following:
- The Objective Value is 0.8765 (i.e. P(Recovered | Optimal evidence) = 87.65%)
- Both DrugA and DrugB have intervention (Do) evidence set to true.
- Click Finish.
Note that the evidence found by the optimizer is now set on the network, as shown below: