DoubleML#

The Python and R package DoubleML provide an implementation of the double / debiased machine learning framework of Chernozhukov et al. (2018). The Python package is built on top of scikit-learn (Pedregosa et al., 2011) and the R package on top of mlr3 and the mlr3 ecosystem (Lang et al., 2019).

Getting started

New to DoubleML? Then check out how to get started!

Getting started

Workflow

The DoubleML workflow demonstrates the typical steps to consider when using DoubleML in applied analysis.

DoubleML Workflow

User guide

Want to learn everything about DoubleML? Then you should visit our extensive user guide with detailed explanations and further references.

parenttoc

Python API

The Python API documentation.

API reference

R API

The R API documentation.

https://docs.doubleml.org/r/stable/

Example gallery

A gallery with examples demonstrating the functionalities of DoubleML.

Examples

Double Machine Learning Algorithm#

Main Features#

Double / debiased machine learning Chernozhukov et al. (2018) for

  • Partially linear regression models (PLR)

  • Partially linear IV regression models (PLIV)

  • Interactive regression models (IRM)

  • Interactive IV regression models (IIVM)

The object-oriented implementation of DoubleML is very flexible. The model classes DoubleMLPLR, DoubleMLPLIV, DoubleMLIRM and DoubleIIVM implement the estimation of the nuisance functions via machine learning methods and the computation of the Neyman orthogonal score function. All other functionalities are implemented in the abstract base class DoubleML. In particular functionalities to estimate double machine learning models and to perform statistical inference via the methods fit, bootstrap, confint, p_adjust and tune. This object-oriented implementation allows a high flexibility for the model specification in terms of …

  • … the machine learning methods for estimation of the nuisance functions,

  • … the resampling schemes,

  • … the double machine learning algorithm,

  • … the Neyman orthogonal score functions,

It further can be readily extended with regards to

  • … new model classes that come with Neyman orthogonal score functions being linear in the target parameter,

  • … alternative score functions via callables,

  • … alternative resampling schemes,

OOP structure of the DoubleML package

Source code and maintenance#

Documentation and website: https://docs.doubleml.org/

DoubleML is currently maintained by @MalteKurz, @PhilippBach and @SvenKlaassen.

The source code is available on GitHub: Python source and R source.

Bugs can be reported to the issue trackers: DoubleML/doubleml-for-py#issues and DoubleML/doubleml-for-r#issues.

Citation#

If you use the DoubleML package a citation is highly appreciated:

Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M. (2022), DoubleML - An Object-Oriented Implementation of Double Machine Learning in Python, Journal of Machine Learning Research, 23(53): 1-6, https://www.jmlr.org/papers/v23/21-0862.html.

Bach, P., Chernozhukov, V., Kurz, M. S., Spindler, M. and Klaassen, S. (2024), DoubleML - An Object-Oriented Implementation of Double Machine Learning in R, Journal of Statistical Software, 108(3): 1-56, doi:10.18637/jss.v108.i03, arXiv:2103.09603.

Bibtex-entries:

@article{DoubleML2022Python,
  title   = {{DoubleML} -- {A}n Object-Oriented Implementation of Double Machine Learning in {P}ython},
  author  = {Philipp Bach and Victor Chernozhukov and Malte S. Kurz and Martin Spindler},
  journal = {Journal of Machine Learning Research},
  year    = {2022},
  volume  = {23},
  number  = {53},
  pages   = {1--6},
  url     = {http://jmlr.org/papers/v23/21-0862.html}
}
@Article{doubleml2024R,
  title   = {{DoubleML}: {A}n Object-Oriented Implementation of Double Machine Learning in {R}},
  author  = {Philipp Bach and Malte S. Kurz and Victor Chernozhukov and Martin Spindler and Sven Klaassen},
  journal = {Journal of Statistical Software},
  year    = {2024},
  volume  = {108},
  number  = {3},
  pages   = {1--56},
  doi     = {10.18637/jss.v108.i03},
  note={arXiv:\href{https://arxiv.org/abs/2103.09603}{2103.09603} [stat.ML]}
}

Acknowledgements#

Funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) is acknowledged – Project Number 431701914.

References#

Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M. (2022), DoubleML - An Object-Oriented Implementation of Double Machine Learning in Python, Journal of Machine Learning Research, 23(53): 1-6, https://www.jmlr.org/papers/v23/21-0862.html.

Bach, P., Chernozhukov, V., Kurz, M. S., Spindler, M. and Klaassen, S. (2024), DoubleML - An Object-Oriented Implementation of Double Machine Learning in R, Journal of Statistical Software, 108(3): 1-56, doi:10.18637/jss.v108.i03, arXiv:2103.09603.

Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W. and Robins, J. (2018), Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21: C1-C68, doi:10.1111/ectj.12097.

Lang, M., Binder, M., Richter, J., Schratz, P., Pfisterer, F., Coors, S., Au, Q., Casalicchio, G., Kotthoff, L. and Bischl, B. (2019), mlr3: A modern object-oriented machine learing framework in R. Journal of Open Source Software, doi:10.21105/joss.01903.

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M. and Duchesnay, E. (2011), Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12: 2825–2830, https://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html.