How doubleml/doubleml-for-py works
Project type and purpose
• This is an open-source Python library (package) implementing the double/debiased machine learning framework of Chernozhukov et al. (2018).
• Its purpose is to provide a flexible, object-oriented API for estimating treatment effects and structural parameters, with support for partially linear regression (PLR), partially linear IV (PLIV), interactive regression (IRM), and interactive IV (IIVM) models.
File structure
• Top-level artifacts:
• doubleml/ — main code base, broken down by submodules:
– data/ — data classes (BaseData, ClusterData, PanelData) + utils
– datasets.py — built-in data generators for demos
– did/ — Difference-in-Differences models + tests
– irm/ — Interactive regression models + tests
– plm/ — Partially linear models (PLR, PLIV) + tests
– rdd/ — Regression discontinuity designs + tests
– utils/ — shared utilities (checks, plots, resampling, learners) + tests
– double_ml.py & double_ml_framework.py — core DoubleML abstract class and main orchestration
• doc/ — Sphinx documentation, templates, auto-generated API docs
• tests/ & module-specific tests/ — pytest suites
• pyproject.toml, pytest.ini, CI workflows, linting & packaging configs
README for additional insights
• Core components: abstract DoubleML base class + four concrete model classes (DoubleMLPLR, DoubleMLPLIV, DoubleMLIRM, DoubleMLIIVM).
• Workflow methods: .fit(), .bootstrap(), .confint(), .p_adjust(), .tune().
• Built on scikit-learn, numpy, pandas, scipy, statsmodels, joblib.