This repository contains small demos illustrating fundamental concepts behind causal machine learning and statistical learning.
This repository is part of an ongoing exploration of causal machine learning and causal NLP, focusing on how models behave under distribution shift and spurious correlations.
The goal of this repository is to build intuition through minimal runnable experiments that connect:
- probability theory
- statistical inference
- causal reasoning
- distribution shift
- representation learning
Each demo focuses on a single core concept and provides a small reproducible example.
search/toy_search
A small A* search demo illustrating planning under fixed world assumptions and
how such systems may fail under mechanism shift.
probability/lln_demo
A simulation illustrating how empirical averages converge to the true
expectation as the number of samples increases.
This principle underlies:
- statistical estimation
- empirical risk minimization
- machine learning training procedures
probability/clt_demo
A simulation showing how the distribution of the sample mean approaches a normal distribution as the sample size increases.
bootstrap_ci_demo
A simulation illustrating how bootstrap resampling approximates the sampling distribution of an estimator and enables confidence interval estimation.
causal-ml-demos
│
├── search
│ └── toy_search
│
├── probability
│ ├── lln_demo
│ ├── clt_demo
│ └── bootstrap_ci_demo
│
└── README.md
Modern machine learning systems often rely on statistical correlations learned from data.
However, robust generalization under distribution shift requires understanding the underlying causal mechanisms that generate data.
These demos aim to explore the conceptual foundations behind:
- causality
- invariance
- mechanism shift
- shortcut learning
through simple and reproducible experiments.