Skip to content

Commit 2f78799

Browse files
authored
Merge pull request #242 from DoubleML/dev
Minor fixes
2 parents 9750b00 + 828b14b commit 2f78799

13 files changed

+113
-106
lines changed

doc/conf.py

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
import doubleml
1717
import plotly.io as pio
1818

19-
sys.path.insert(0, os.path.abspath('..'))
19+
sys.path.insert(0, os.path.abspath(".."))
2020

2121
# Set the default renderer for Plotly
22-
pio.renderers.default = 'sphinx_gallery'
22+
pio.renderers.default = "sphinx_gallery"
2323

2424
# -- Project information -----------------------------------------------------
2525

26-
project = 'DoubleML'
27-
copyright = '2023, Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
28-
author = 'Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
26+
project = "DoubleML"
27+
copyright = "2023, Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M."
28+
author = "Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M."
2929

3030

3131
# -- General configuration ---------------------------------------------------
@@ -34,46 +34,46 @@
3434
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3535
# ones.
3636
extensions = [
37-
'sphinx.ext.autodoc',
38-
'sphinx.ext.autosummary',
39-
'sphinx.ext.coverage',
40-
'sphinx.ext.doctest',
41-
'sphinx.ext.graphviz',
42-
'sphinx.ext.intersphinx',
43-
'sphinx.ext.mathjax',
44-
'sphinx.ext.napoleon',
45-
'IPython.sphinxext.ipython_console_highlighting',
46-
'IPython.sphinxext.ipython_directive',
47-
'matplotlib.sphinxext.plot_directive',
48-
'nbsphinx',
49-
'sphinx_gallery.load_style',
50-
'sphinx_copybutton',
51-
'sphinx_design',
52-
'jupyter_sphinx',
37+
"sphinx.ext.autodoc",
38+
"sphinx.ext.autosummary",
39+
"sphinx.ext.coverage",
40+
"sphinx.ext.doctest",
41+
"sphinx.ext.graphviz",
42+
"sphinx.ext.intersphinx",
43+
"sphinx.ext.mathjax",
44+
"sphinx.ext.napoleon",
45+
"IPython.sphinxext.ipython_console_highlighting",
46+
"IPython.sphinxext.ipython_directive",
47+
"matplotlib.sphinxext.plot_directive",
48+
"nbsphinx",
49+
"sphinx_gallery.load_style",
50+
"sphinx_copybutton",
51+
"sphinx_design",
52+
"jupyter_sphinx",
5353
]
5454

5555
# sphinx-panels shouldn't add bootstrap css since the pydata-sphinx-theme
5656
# already loads it
5757
panels_add_bootstrap_css = False
5858

5959
# Add any paths that contain templates here, relative to this directory.
60-
templates_path = ['_templates']
60+
templates_path = ["_templates"]
6161

6262
# List of patterns, relative to source directory, that match files and
6363
# directories to ignore when looking for source files.
6464
# This pattern also affects html_static_path and html_extra_path.
65-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'shared/*']
65+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "shared/*"]
6666

67-
master_doc = 'index'
67+
master_doc = "index"
6868

69-
autoclass_content = 'class'
69+
autoclass_content = "class"
7070
autosummary_generate = True
7171

7272
# -- Options for HTML output -------------------------------------------------
7373

7474
# The theme to use for HTML and HTML Help pages. See the documentation for
7575
# a list of builtin themes.
76-
html_theme = 'pydata_sphinx_theme'
76+
html_theme = "pydata_sphinx_theme"
7777

7878
# version for the switcher
7979
if "dev" in doubleml.__version__:
@@ -124,26 +124,26 @@
124124
"json_url": "https://docs.doubleml.org/dev/_static/switcher.json",
125125
"version_match": version,
126126
},
127-
"show_version_warning_banner": True,
127+
"show_version_warning_banner": False, # https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/announcements.html#version-warning-banners
128128
"check_switcher": True,
129129
"announcement": "Interested to learn more? We offer <a href='https://trainings.doubleml.org/'>DoubleML Trainings!</a>",
130130
}
131131

132-
html_extra_path = ['../img/logo.png', '../img/logo_dark.png']
133-
html_favicon = '../img/favicon.ico'
132+
html_extra_path = ["../img/logo.png", "../img/logo_dark.png"]
133+
html_favicon = "../img/favicon.ico"
134134

135135
html_sidebars = {
136-
'**': [
137-
'logo.html',
138-
'search-field.html',
139-
'sidebar-nav-bs.html',
136+
"**": [
137+
"logo.html",
138+
"search-field.html",
139+
"sidebar-nav-bs.html",
140140
],
141-
'index': [],
142-
'intro/install': [],
143-
'intro/intro': [],
144-
'workflow/workflow': [],
145-
'literature/literature': [],
146-
'release/release': [],
141+
"index": [],
142+
"intro/install": [],
143+
"intro/intro": [],
144+
"workflow/workflow": [],
145+
"literature/literature": [],
146+
"release/release": [],
147147
}
148148

149149
html_context = {
@@ -156,25 +156,25 @@
156156
# Add any paths that contain custom static files (such as style sheets) here,
157157
# relative to this directory. They are copied after the builtin static files,
158158
# so a file named "default.css" will overwrite the builtin "default.css".
159-
html_static_path = ['_static']
160-
html_css_files = ['css/custom.css']
159+
html_static_path = ["_static"]
160+
html_css_files = ["css/custom.css"]
161161

162162
# -- Extension configuration -------------------------------------------------
163163

164164
nbsphinx_thumbnails = {
165-
'examples/py_double_ml_sensitivity': '_static/sensitivity_example_nb.png',
166-
'examples/py_double_ml_gate_sensitivity': '_static/sensitivity_example_nb.png',
167-
'examples/py_double_ml_firststage': '_static/firststage_example_nb.png',
168-
'examples/py_double_ml_basic_iv': '_static/basic_iv_example_nb.png',
169-
'examples/py_double_ml_robust_iv': '_static/basic_iv_example_nb.png',
170-
'examples/R_double_ml_basic_iv': '_static/basic_iv_example_nb.png',
171-
'examples/py_double_ml_robust_iv': '_static/robust_iv_example_nb.png',
172-
'examples/py_double_ml_ssm': '_static/ssm_example_nb.svg',
173-
'examples/R_double_ml_ssm': '_static/ssm_example_nb.svg',
174-
'examples/py_double_ml_sensitivity_booking': '_static/dag_usecase_revised.png',
165+
"examples/py_double_ml_sensitivity": "_static/sensitivity_example_nb.png",
166+
"examples/py_double_ml_gate_sensitivity": "_static/sensitivity_example_nb.png",
167+
"examples/py_double_ml_firststage": "_static/firststage_example_nb.png",
168+
"examples/py_double_ml_basic_iv": "_static/basic_iv_example_nb.png",
169+
"examples/py_double_ml_robust_iv": "_static/basic_iv_example_nb.png",
170+
"examples/R_double_ml_basic_iv": "_static/basic_iv_example_nb.png",
171+
"examples/py_double_ml_robust_iv": "_static/robust_iv_example_nb.png",
172+
"examples/py_double_ml_ssm": "_static/ssm_example_nb.svg",
173+
"examples/R_double_ml_ssm": "_static/ssm_example_nb.svg",
174+
"examples/py_double_ml_sensitivity_booking": "_static/dag_usecase_revised.png",
175175
}
176176

177-
copybutton_prompt_text = r'>>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: | {2,5}\.\.\.\.:'
177+
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: | {2,5}\.\.\.\.:"
178178
copybutton_prompt_is_regexp = True
179179

180180
# config of sphinx gallery for examples
@@ -195,86 +195,86 @@
195195

196196
# intersphinx configuration
197197
intersphinx_mapping = {
198-
'python': ('https://docs.python.org/{.major}'.format(sys.version_info), None),
199-
'sklearn': ('https://scikit-learn.org/stable/', None),
200-
'numpy': ('https://numpy.org/doc/stable/', None),
201-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
202-
'statsmodels': ('https://www.statsmodels.org/stable/', None),
198+
"python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
199+
"sklearn": ("https://scikit-learn.org/stable/", None),
200+
"numpy": ("https://numpy.org/doc/stable/", None),
201+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
202+
"statsmodels": ("https://www.statsmodels.org/stable/", None),
203203
}
204204

205205
linkcheck_ignore = [
206206
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
207-
'https://doi.org/10.1093/ectj/utaa001',
207+
"https://doi.org/10.1093/ectj/utaa001",
208208
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
209-
'https://doi.org/10.1111/ectj.12097',
209+
"https://doi.org/10.1111/ectj.12097",
210210
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
211-
'https://doi.org/10.2307/2171802',
211+
"https://doi.org/10.2307/2171802",
212212
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
213-
'https://doi.org/10.2307/1912705',
213+
"https://doi.org/10.2307/1912705",
214214
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
215-
'https://doi.org/10.1093/ectj/utaa027',
215+
"https://doi.org/10.1093/ectj/utaa027",
216216
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
217-
'https://doi.org/10.1111/rssb.12026',
217+
"https://doi.org/10.1111/rssb.12026",
218218
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
219-
'https://doi.org/10.1111/rssa.12623',
219+
"https://doi.org/10.1111/rssa.12623",
220220
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
221-
'https://doi.org/10.1146/annurev-economics-012315-015826',
221+
"https://doi.org/10.1146/annurev-economics-012315-015826",
222222
# Valid DOI, Causes 418 Client Error: unknown for url:...
223-
'https://doi.org/10.1109/TIT.2014.2343629',
223+
"https://doi.org/10.1109/TIT.2014.2343629",
224224
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
225-
'https://doi.org/10.1093/ectj/utaa001',
225+
"https://doi.org/10.1093/ectj/utaa001",
226226
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
227-
'https://doi.org/10.1111/0034-6527.00321',
227+
"https://doi.org/10.1111/0034-6527.00321",
228228
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
229-
'https://doi.org/10.1016/j.jeconom.2020.06.003',
229+
"https://doi.org/10.1016/j.jeconom.2020.06.003",
230230
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
231-
'https://doi.org/10.1080/07350015.2021.1895815',
231+
"https://doi.org/10.1080/07350015.2021.1895815",
232232
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
233-
'https://doi.org/10.1198/jbes.2010.07136',
233+
"https://doi.org/10.1198/jbes.2010.07136",
234234
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
235-
'https://doi.org/10.1111/rssb.12348',
235+
"https://doi.org/10.1111/rssb.12348",
236236
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
237-
'https://doi.org/10.1145/3460231.3474231',
237+
"https://doi.org/10.1145/3460231.3474231",
238238
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
239-
'https://dl.acm.org/doi/10.1145/3447545.3451181',
239+
"https://dl.acm.org/doi/10.1145/3447545.3451181",
240240
# Pipelines notebook has to be reworked
241-
'https://mlr3book.mlr-org.com/pipelines.html',
241+
"https://mlr3book.mlr-org.com/pipelines.html",
242242
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
243-
'https://doi.org/10.1080/07350015.2023.2271071',
243+
"https://doi.org/10.1080/07350015.2023.2271071",
244244
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
245-
'https://doi.org/10.1093/restud/rdt044',
245+
"https://doi.org/10.1093/restud/rdt044",
246246
# Valid DOI; 'Connection aborted.', RemoteDisconnected ...
247-
'https://CRAN.R-project.org/package=mlr3learners',
247+
"https://CRAN.R-project.org/package=mlr3learners",
248248
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
249-
'https://doi.org/10.1214/14-AOS1204',
249+
"https://doi.org/10.1214/14-AOS1204",
250250
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
251-
'https://doi.org/10.1214/14-AOS1221',
251+
"https://doi.org/10.1214/14-AOS1221",
252252
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
253-
'https://doi.org/10.1214/17-AOS1671',
253+
"https://doi.org/10.1214/17-AOS1671",
254254
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
255-
'https://dx.doi.org/10.1214/13-AOS1161',
255+
"https://dx.doi.org/10.1214/13-AOS1161",
256256
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
257-
'https://dx.doi.org/10.1214/14-AOS1230',
257+
"https://dx.doi.org/10.1214/14-AOS1230",
258258
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
259-
'https://glmnet.stanford.edu/',
259+
"https://glmnet.stanford.edu/",
260260
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
261-
'https://glmnet.stanford.edu/index.html',
261+
"https://glmnet.stanford.edu/index.html",
262262
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
263-
'https://glmnet.stanford.edu/reference/cv.glmnet.html',
263+
"https://glmnet.stanford.edu/reference/cv.glmnet.html",
264264
# Valid URL (error not replicable), Causes 409 Client Error: Too Many Requests for url
265-
'http://dx.doi.org/10.2139/ssrn.3619201',
265+
"http://dx.doi.org/10.2139/ssrn.3619201",
266266
# Valid URL, Causes ConnectTimeoutError
267-
'https://folia.unifr.ch/global/documents/306524',
267+
"https://folia.unifr.ch/global/documents/306524",
268268
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
269-
'https://doi.org/10.1146/annurev-economics-051520-021409',
269+
"https://doi.org/10.1146/annurev-economics-051520-021409",
270270
# Valdi DOI; Causes 504 Server Error: Gateway Time-out for ...
271-
'https://doi.org/10.1017/CBO9781139060035.008'
271+
"https://doi.org/10.1017/CBO9781139060035.008",
272272
]
273273

274274
# To execute R code via jupyter-execute one needs to install the R kernel for jupyter
275275
# https://github.com/IRkernel/IRkernel
276276

277-
jupyter_execute_default_kernel = 'ir'
277+
jupyter_execute_default_kernel = "ir"
278278
jupyter_sphinx_linenos = False
279279

280280
# option to disable the execution of notebooks

doc/examples/R_double_ml_did.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@
492492
"\n",
493493
"We'd like to thank the authors of the `did` package for R for maintaining a flexible interface for multi-period DiD models.\n",
494494
"\n",
495-
"We'd like to note that the implementation presented is here is very similar to the one implemented in the Python package. For more details, we would like to reference to the [DiD](https://docs.doubleml.org/stable/examples/py_double_ml_did.html) and [pretesting](https://docs.doubleml.org/stable/examples/py_double_ml_did_pretest.html) examples in Python."
495+
"We'd like to note that the implementation presented is here is very similar to the one implemented in the Python package. For more details, we would like to reference to the [DiD](https://docs.doubleml.org/stable/examples/index.html#difference-in-differences) examples in Python."
496496
]
497497
},
498498
{

doc/examples/py_double_ml_apo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
"cell_type": "markdown",
172172
"metadata": {},
173173
"source": [
174-
"As for all [DoubleML](https://docs.doubleml.org/stable/index.html) models, we specify a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html#doubleml.DoubleMLData) object to handle the data."
174+
"As for all [DoubleML](https://docs.doubleml.org/stable/index.html) models, we specify a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLData.html) object to handle the data."
175175
]
176176
},
177177
{

doc/examples/py_double_ml_cate.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"cell_type": "markdown",
100100
"metadata": {},
101101
"source": [
102-
"Next, define the learners for the nuisance functions and fit the [IRM Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLIRM.html). Remark that linear learners would usually be optimal due to the data generating process."
102+
"Next, define the learners for the nuisance functions and fit the [IRM Model](https://docs.doubleml.org/stable/guide/models.html#interactive-regression-models-irm). Remark that linear learners would usually be optimal due to the data generating process."
103103
]
104104
},
105105
{
@@ -261,7 +261,7 @@
261261
"cell_type": "markdown",
262262
"metadata": {},
263263
"source": [
264-
"As univariate example estimate the [IRM Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLIRM.html)."
264+
"As univariate example estimate the [IRM Model](https://docs.doubleml.org/stable/guide/models.html#interactive-regression-models-irm)."
265265
]
266266
},
267267
{

doc/examples/py_double_ml_cate_plr.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"cell_type": "markdown",
9696
"metadata": {},
9797
"source": [
98-
"Next, define the learners for the nuisance functions and fit the [PLR Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLPLR.html). Remark that linear learners would usually be optimal due to the data generating process."
98+
"Next, define the learners for the nuisance functions and fit the [PLR Model](https://docs.doubleml.org/stable/guide/models.html#partially-linear-models-plm). Remark that linear learners would usually be optimal due to the data generating process."
9999
]
100100
},
101101
{
@@ -255,7 +255,7 @@
255255
"cell_type": "markdown",
256256
"metadata": {},
257257
"source": [
258-
"As univariate example estimate the [PLR Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLPLR.html)."
258+
"As univariate example estimate the [PLR Model](https://docs.doubleml.org/stable/guide/models.html#partially-linear-regression-model-plr)."
259259
]
260260
},
261261
{

doc/examples/py_double_ml_cvar.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"collapsed": false
146146
},
147147
"source": [
148-
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
148+
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLData.html) object."
149149
]
150150
},
151151
{

doc/examples/py_double_ml_multiway_cluster.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
},
151151
"source": [
152152
"### Data-Backend for Cluster Data\n",
153-
"The implementation of cluster robust double machine learning is based on a special data-backend called [DoubleMLClusterData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLClusterData.html#doubleml.DoubleMLClusterData). As compared to the standard data-backend [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html), users can specify the clustering variables during instantiation of a [DoubleMLClusterData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLClusterData.html#doubleml.DoubleMLClusterData) object. The estimation framework will subsequently account for the provided clustering options."
153+
"The implementation of cluster robust double machine learning is based on a special data-backend called [DoubleMLClusterData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLClusterData.html). As compared to the standard data-backend [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLData.html), users can specify the clustering variables during instantiation of a [DoubleMLClusterData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLClusterData.html) object. The estimation framework will subsequently account for the provided clustering options."
154154
]
155155
},
156156
{

doc/examples/py_double_ml_pq.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"collapsed": false
156156
},
157157
"source": [
158-
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
158+
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/guide/data_backend.html#doublemldata) object."
159159
]
160160
},
161161
{
@@ -740,7 +740,7 @@
740740
"cell_type": "markdown",
741741
"metadata": {},
742742
"source": [
743-
"Let us generate $n=10000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
743+
"Let us generate $n=10000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/guide/data_backend.html#doublemldata) object."
744744
]
745745
},
746746
{

doc/examples/py_double_ml_robust_iv.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
"id": "946cbbcf",
208208
"metadata": {},
209209
"source": [
210+
"- Chernozhukov, V. & Hansen, C. & Kallus, N. & Spindler, M. & Syrgkanis, V. (2024): Applied Causal Inference Powered by ML and AI; Chapter 13. CausalML-book.org; arXiv:2403.02467.\n",
210211
"- Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., and Hansen, C. (2018). Double/debiased machine learning for\n",
211212
"treatment and structural parameters. The Econometrics Journal, 21(1):C1–C68.\n",
212213
"- Ma, Y. (2023). Identification-robust inference for the late with high-dimensional covariates. arXiv preprint arXiv:2302.09756.\n",

0 commit comments

Comments
 (0)