Tigramite v5.2
Master Causal Inference for Time Series
A practical, step-by-step guide from zero to expert. Learn to discover what CAUSES what in your time series data.
Your Learning Journey
Follow this structured path to master causal inference. Each part builds on the previous.
1
Foundations
Understand the "why" before the "how"
~60 min2
Core Skills
Master essential techniques
~75 min3
Advanced
Go deeper with effects & prediction
~65 min4
Projects
Apply skills to real scenarios
~30 minInstallation
Get started in seconds:
# Basic installation
pip install tigramite
# Or with all optional dependencies
pip install tigramite[all]
# Or from source (if you cloned the repo)
cd Trigmate
pip install -e .
Required packages: numpy, scipy, matplotlib
Quick Start
Your first causal discovery in 4 lines:
import numpy as np
from tigramite import data_processing as pp
from tigramite import plotting as tp
from tigramite.pcmci import PCMCI
from tigramite.independence_tests.parcorr import ParCorr
# 1. Your data: shape (time_steps, variables)
data = np.loadtxt('your_data.csv', delimiter=',')
dataframe = pp.DataFrame(data, var_names=['X', 'Y', 'Z'])
# 2. Set up PCMCI
pcmci = PCMCI(dataframe=dataframe, cond_ind_test=ParCorr())
# 3. Discover causal structure
results = pcmci.run_pcmci(tau_max=5, pc_alpha=0.05)
# 4. Visualize
tp.plot_graph(graph=results['graph'], val_matrix=results['val_matrix'])
Quick Decision Guides
Which Test Should I Use?
Is your data continuous (numbers)?
├── Yes: Are relationships linear?
│ ├── Yes → ParCorr (fast, simple)
│ └── No → CMIknn (flexible, slower)
└── No (categories) → Gsquared
Which Method Should I Use?
Do effects happen instantly in your data?
├── No (only lagged) → PCMCI
└── Yes (same-time effects possible)
└── Might there be hidden confounders?
├── No → PCMCIplus
└── Yes → LPCMCI
Troubleshooting
| Problem | Solution |
|---|---|
| No links found | Lower alpha_level, increase tau_max |
| Too many links | Apply FDR correction, lower alpha_level |
| Slow runtime | Use ParCorr instead of CMIknn |
| Memory error | Reduce tau_max or sample size |