Table of Contents

Lab: Uncertainty

Before the lab

Entry quiz

Q&A

  1. Can more evidence make a model less reliable?
  2. Why can confirming one cause make another cause less likely?
  3. Why does variable elimination order matter if the posterior remains the same?
  4. Can a correctly fitted Bayesian network still give misleading probabilities?

Notebook

Notebook: HCAI_Lab_Uncertainty.ipynb (Work in Google Colab or download the .ipynb file to local environment)

Work in groups of 2-4. Every group member must be able to explain the results.

Challenge

Work in groups of 2-4 using the standard ALARM Bayesian network and the official pgmpy parameter-learning workflow.

The network represents dependencies between variables used in patient monitoring. Instead of building a Bayesian network from scratch, you will load an existing benchmark model, investigate its behavior, generate observations, and determine how limited or biased data affect probabilistic inference.

Begin with the official pgmpy example: Parameter Learning in Discrete Bayesian Networks
Use the benchmark model as in the example:

from pgmpy.example_models import load_model
 
alarm_model = load_model("bnlearn/alarm")

Your investigation:
Choose one meaningful query variable and a small set of related evidence variables. Then:

Start the challenge during the lab and continue it as part of the self-study regarding classes. Selected groups may share their findings at the beginning of the next lab, and particularly insightful analyses may receive bonus points.

Learn more!