Skip to content

Remove apply crossfitting and dml1 #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.idea
*.idea
*.vscode
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,6 @@

jupyter_execute_default_kernel = 'ir'
jupyter_sphinx_linenos = False

# option to disable the execution of notebooks
nbsphinx_execute = "auto" # "auto" | "always" | "never"
848 changes: 848 additions & 0 deletions doc/examples/R_double_ml_basics.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions doc/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ General Examples
.. nbgallery::
:name: case-studies-py

py_double_ml_basics.ipynb
py_double_ml_pension.ipynb
py_double_ml_sensitivity.ipynb
py_double_ml_learner.ipynb
Expand Down Expand Up @@ -51,6 +52,7 @@ These are case studies with the R package :ref:`DoubleML <doubleml_package>`.
.. nbgallery::
:name: case-studies-r

R_double_ml_basics.ipynb
R_double_ml_pension.ipynb
R_double_ml_multiway_cluster.ipynb
R_double_ml_basic_iv.ipynb
Expand Down
709 changes: 709 additions & 0 deletions doc/examples/py_double_ml_basics.ipynb

Large diffs are not rendered by default.

1,064 changes: 0 additions & 1,064 deletions doc/examples/py_elasticity_preprocessing.ipynb

This file was deleted.

32 changes: 12 additions & 20 deletions doc/guide/algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Double machine learning algorithms

The DoubleML package comes with two different algorithms to obtain DML estimates.

.. note::
The algorithms are argument ``dml_procedure`` is deprecated in the python package. Generally, the second version of the algorithm DML2 is recommended, to obtain
more stable estimates.

Algorithm DML1
++++++++++++++

Expand Down Expand Up @@ -71,7 +75,7 @@ Implementation of the double machine learning algorithms

As an example we consider a partially linear regression model (PLR)
implemented in ``DoubleMLPLR``.
The DML algorithm can be selected via parameter ``dml_procedure='dml1'`` vs. ``dml_procedure='dml2'``.
The default version of the :class:`DoubleML` class is based on the DML2 algorithm.

.. tab-set::

Expand All @@ -91,12 +95,14 @@ The DML algorithm can be selected via parameter ``dml_procedure='dml1'`` vs. ``d
ml_m = clone(learner)
data = make_plr_CCDDHNR2018(alpha=0.5, return_type='DataFrame')
obj_dml_data = dml.DoubleMLData(data, 'y', 'd')
dml_plr_obj = dml.DoubleMLPLR(obj_dml_data, ml_l, ml_m, dml_procedure='dml1')
dml_plr_obj = dml.DoubleMLPLR(obj_dml_data, ml_l, ml_m)
dml_plr_obj.fit();

.. tab-item:: R
:sync: r

The DML algorithm can be selected via parameter ``dml_procedure='dml1'`` vs. ``dml_procedure='dml2'``.

.. jupyter-execute::

library(DoubleML)
Expand Down Expand Up @@ -151,27 +157,13 @@ are stored in the attribute ``psi``.
.. tab-item:: R
:sync: r

For the DML1 algorithm, the estimates for the different folds
:math:`\check{\theta}_{0,k}``, :math:`k \in [K]` are stored in attribute ``all_dml1_coef``.

.. jupyter-execute::

dml_plr_obj$psi[1:5, ,1]


For the DML1 algorithm, the estimates for the different folds
:math:`\check{\theta}_{0,k}``, :math:`k \in [K]` are stored in attribute ``all_dml1_coef``.

.. tab-set::

.. tab-item:: Python
:sync: py

.. ipython:: python

dml_plr_obj.all_dml1_coef

.. tab-item:: R
:sync: r


.. jupyter-execute::

dml_plr_obj$all_dml1_coef

729 changes: 161 additions & 568 deletions doc/guide/basics.rst

Large diffs are not rendered by default.

Loading