Member-only story
Causal Python — Level Up Your Causal Discovery Skills in Python (2024)
…and unlock the best Causal Discovery package in Python!
Introduction
The recent surge in interest in causality-related topics in Python has led to a wealth of resources making a decision what to focus on challenging.
For instance, many resources on the internet describe a popular NOTEARS algorithm (Zheng et al., 2018) as the “state-of-the-art structure learning method”, yet NOTEARS has been repeatedly shown to be at least problematic for this purpose (Kaiser & Sipos, 2021; Reisach et al., 2021; Seng et al., 2022). This does not mean that NOTEARS is always useless, but applying it uncritically to your problems might bring you more harm than good.
In this blog post we’ll learn how to perform causal discovery in Python, discuss main advantages of selected methods and highlight common risks related to the process of causal discovery.
This blog is a part of the series where I share practical tips on learning about causality and implementing causal models in Python.
[Links to the notebook and the conda environment file are below]
Let’s learn how to discover!
What Is Causal Discovery?
Casual discovery, also known as causal structure learning denotes a broad set of methods aiming at retrieving information about causal mechanisms from observational or interventional data. In other words, causal discovery algorithms try to decode the causal structure of the data generating process, using the data generated by this process.
Some of these algorithms allow us to easily incorporate prior knowledge (also called expert knowledge) in the form of constraints. This helps narrow down the problem space and makes it easier for the algorithm to find a good solution.
In most cases we describe the data generating process using a directed acyclic graph (DAG).