3 Building a causal graphical model

 

This chapter covers

  • Building a causal DAG to model a DGP
  • Using your causal graph as a communication, computation, and reasoning tool
  • Building a causal DAG in pgmpy and Pyro
  • Training a probabilistic machine learning model using the causal DAG as a scaffold

In this chapter, we’ll build our first models of the data generating process (DGP) using the causal directed acyclic graph (causal DAG)—a directed graph without cycles, where the edges represent causal relationships. We’ll also look at how to train a statistical model using the causal DAG as a scaffold.

3.1 Introducing the causal DAG

Let’s assume we can partition the DGP into a set of variables where a given combination of variable values represents a possible state of the DGP. Those variables may be discrete or continuous. They can be univariate, or they can be multivariate vectors or matrices.

A causal DAG is a directed graph where the nodes are this set of variables and the directed edges represent the causal relationships between them. When we use a causal DAG to represent the DGP, we assume the edges reflect true causality in the DGP.

3.1.1 Case study: A causal model for transportation

3.1.2 Why use a causal DAG?

3.1.3 DAGs are useful in communicating and visualizing causal assumptions

3.1.4 We have many tools for computing over DAGs

3.1.5 Causal DAGs can represent time

3.1.6 DAGs link causality to conditional independence

3.1.7 DAGs can provide scaffolding for probabilistic ML models