Skip to content

Commit 0d3e96c

Browse files
authored
Merge pull request #130 from DoubleML/dev
Update main after new release
2 parents 293b16a + 384555b commit 0d3e96c

30 files changed

+4703
-175
lines changed

.github/workflows/deploy_docu_dev.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
name: Deploy Docu (dev)
44

55
on:
6-
push:
7-
branches:
8-
- dev
96
workflow_dispatch:
107

118

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
*.idea
2-
1+
*.idea

LICENSE

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
Copyright (c) 2019-2021 Philipp Bach, Victor Chernozhukov, Malte S. Kurz, Martin Spindler
1+
BSD 3-Clause License
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy
4-
of this software and associated documentation files (the "Software"), to deal
5-
in the Software without restriction, including without limitation the rights
6-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7-
copies of the Software, and to permit persons to whom the Software is
8-
furnished to do so, subject to the following conditions:
3+
Copyright (c) 2019-2023 Philipp Bach, Victor Chernozhukov, Sven Klaassen, Malte S. Kurz, Martin Spindler
4+
All rights reserved.
95

10-
The above copyright notice and this permission notice shall be included in all
11-
copies or substantial portions of the Software.
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
128

13-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19-
SOFTWARE.
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

doc/api/api.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ Double machine learning models
2626
DoubleMLPLIV
2727
DoubleMLIRM
2828
DoubleMLIIVM
29-
29+
DoubleMLPQ
30+
DoubleMLLPQ
31+
DoubleMLCVAR
32+
DoubleMLQTE
33+
DoubleMLBLP
3034

3135
Datasets module
3236
---------------

doc/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'DoubleML'
21-
copyright = '2021, Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M.'
22-
author = 'Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M.'
21+
copyright = '2023, Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
22+
author = 'Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
2323

2424

2525
# -- General configuration ---------------------------------------------------
@@ -130,6 +130,9 @@
130130
'https://doi.org/10.2307/2171802', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
131131
'https://doi.org/10.2307/1912705', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
132132
'https://doi.org/10.1093/ectj/utaa027', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
133+
'https://doi.org/10.1111/rssb.12026', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
134+
'https://doi.org/10.1111/rssa.12623', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
135+
'https://doi.org/10.1146/annurev-economics-012315-015826', # Valid DOI; Causes 403 Client Error: Forbidden for url:...
133136
]
134137

135138
# To execute R code via jupyter-execute one needs to install the R kernel for jupyter

doc/examples/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
:parenttoc: True
33

4+
.. _examplegallery:
5+
46
Examples
57
==========
68

@@ -27,6 +29,10 @@ These are case studies with the Python package :ref:`DoubleML <doubleml_package>
2729
py_double_ml_multiway_cluster.ipynb
2830
py_double_ml_gate.ipynb
2931
py_double_ml_cate.ipynb
32+
py_double_ml_pension_qte.ipynb
33+
py_double_ml_pq.ipynb
34+
py_double_ml_cvar.ipynb
35+
py_double_ml_learner.ipynb
3036

3137
|start-h3| Sandbox |end-h3|
3238

doc/examples/py_double_ml_cate.ipynb

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
]
1313
},
1414
{
15+
"attachments": {},
1516
"cell_type": "markdown",
1617
"metadata": {
1718
"collapsed": false
1819
},
1920
"source": [
2021
"## Data\n",
2122
"\n",
22-
"We define a data generating process to create synthetic data to compare the estimates to the true effect. The data generating process is based on the Monte Carlo simulation from this [paper](https://arxiv.org/abs/1806.03467) and this implementation from [EconML](https://github.com/microsoft/EconML)."
23+
"We define a data generating process to create synthetic data to compare the estimates to the true effect. The data generating process is based on the Monte Carlo simulation from [Oprescu et al. (2019)](http://proceedings.mlr.press/v97/oprescu19a.html) and this [notebook](https://github.com/py-why/EconML/blob/main/notebooks/Causal%20Forest%20and%20Orthogonal%20Random%20Forest%20Examples.ipynb) from [EconML](https://github.com/py-why/EconML)."
2324
]
2425
},
2526
{
@@ -80,33 +81,6 @@
8081
" return te\n",
8182
"\n",
8283
"def create_synthetic_data(n_samples=200, n_w=30, support_size=5, n_x=1):\n",
83-
" \"\"\"\n",
84-
" Creates a simple synthetic example for conditional treatment effects.\n",
85-
"\n",
86-
" Parameters\n",
87-
" ----------\n",
88-
" n_samples : int\n",
89-
" Number of samples.\n",
90-
" Default is ``200``.\n",
91-
"\n",
92-
" n_w : int\n",
93-
" Dimension of covariates.\n",
94-
" Default is ``30``.\n",
95-
"\n",
96-
" support_size : int\n",
97-
" Number of relevant covariates.\n",
98-
" Default is ``5``.\n",
99-
"\n",
100-
" n_x : int\n",
101-
" Dimension of treatment variable.\n",
102-
" Default is ``1``.\n",
103-
"\n",
104-
" Returns\n",
105-
" -------\n",
106-
" data : pd.DataFrame\n",
107-
" A data frame.\n",
108-
"\n",
109-
" \"\"\"\n",
11084
" # Outcome support\n",
11185
" # With the next two lines we are effectively choosing the matrix gamma in the example\n",
11286
" support_y = np.random.choice(np.arange(n_w), size=support_size, replace=False)\n",
@@ -219,12 +193,13 @@
219193
]
220194
},
221195
{
196+
"attachments": {},
222197
"cell_type": "markdown",
223198
"metadata": {
224199
"collapsed": false
225200
},
226201
"source": [
227-
"To estimate the CATE, we rely on the best-linear-predictor of the linear score as in [Semenova et al.](https://doi.org/10.1093/ectj/utaa027) To approximate the target function $g(x)$ with a linear form, we have to define a data frame of basis functions. Here, we rely on [patsy](https://patsy.readthedocs.io/en/latest/) to construct a suitable basis of [B-splines](https://en.wikipedia.org/wiki/B-spline)."
202+
"To estimate the CATE, we rely on the best-linear-predictor of the linear score as in [Semenova et al. (2021)](https://doi.org/10.1093/ectj/utaa027) To approximate the target function $g(x)$ with a linear form, we have to define a data frame of basis functions. Here, we rely on [patsy](https://patsy.readthedocs.io/en/latest/) to construct a suitable basis of [B-splines](https://en.wikipedia.org/wiki/B-spline)."
228203
]
229204
},
230205
{
@@ -241,6 +216,7 @@
241216
]
242217
},
243218
{
219+
"attachments": {},
244220
"cell_type": "markdown",
245221
"metadata": {
246222
"collapsed": false
@@ -262,6 +238,7 @@
262238
]
263239
},
264240
{
241+
"attachments": {},
265242
"cell_type": "markdown",
266243
"metadata": {
267244
"collapsed": false

0 commit comments

Comments
 (0)