Skip to content
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
182 changes: 91 additions & 91 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
import doubleml
import plotly.io as pio

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))

# Set the default renderer for Plotly
pio.renderers.default = 'sphinx_gallery'
pio.renderers.default = "sphinx_gallery"

# -- Project information -----------------------------------------------------

project = 'DoubleML'
copyright = '2023, Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
author = 'Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M.'
project = "DoubleML"
copyright = "2023, Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M."
author = "Bach, P., Chernozhukov, V., Klaassen, S., Kurz, M. S., and Spindler, M."


# -- General configuration ---------------------------------------------------
Expand All @@ -34,46 +34,46 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
'matplotlib.sphinxext.plot_directive',
'nbsphinx',
'sphinx_gallery.load_style',
'sphinx_copybutton',
'sphinx_design',
'jupyter_sphinx',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"IPython.sphinxext.ipython_console_highlighting",
"IPython.sphinxext.ipython_directive",
"matplotlib.sphinxext.plot_directive",
"nbsphinx",
"sphinx_gallery.load_style",
"sphinx_copybutton",
"sphinx_design",
"jupyter_sphinx",
]

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

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

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

master_doc = 'index'
master_doc = "index"

autoclass_content = 'class'
autoclass_content = "class"
autosummary_generate = True

# -- Options for HTML output -------------------------------------------------

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

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

html_extra_path = ['../img/logo.png', '../img/logo_dark.png']
html_favicon = '../img/favicon.ico'
html_extra_path = ["../img/logo.png", "../img/logo_dark.png"]
html_favicon = "../img/favicon.ico"

html_sidebars = {
'**': [
'logo.html',
'search-field.html',
'sidebar-nav-bs.html',
"**": [
"logo.html",
"search-field.html",
"sidebar-nav-bs.html",
],
'index': [],
'intro/install': [],
'intro/intro': [],
'workflow/workflow': [],
'literature/literature': [],
'release/release': [],
"index": [],
"intro/install": [],
"intro/intro": [],
"workflow/workflow": [],
"literature/literature": [],
"release/release": [],
}

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

# -- Extension configuration -------------------------------------------------

nbsphinx_thumbnails = {
'examples/py_double_ml_sensitivity': '_static/sensitivity_example_nb.png',
'examples/py_double_ml_gate_sensitivity': '_static/sensitivity_example_nb.png',
'examples/py_double_ml_firststage': '_static/firststage_example_nb.png',
'examples/py_double_ml_basic_iv': '_static/basic_iv_example_nb.png',
'examples/py_double_ml_robust_iv': '_static/basic_iv_example_nb.png',
'examples/R_double_ml_basic_iv': '_static/basic_iv_example_nb.png',
'examples/py_double_ml_robust_iv': '_static/robust_iv_example_nb.png',
'examples/py_double_ml_ssm': '_static/ssm_example_nb.svg',
'examples/R_double_ml_ssm': '_static/ssm_example_nb.svg',
'examples/py_double_ml_sensitivity_booking': '_static/dag_usecase_revised.png',
"examples/py_double_ml_sensitivity": "_static/sensitivity_example_nb.png",
"examples/py_double_ml_gate_sensitivity": "_static/sensitivity_example_nb.png",
"examples/py_double_ml_firststage": "_static/firststage_example_nb.png",
"examples/py_double_ml_basic_iv": "_static/basic_iv_example_nb.png",
"examples/py_double_ml_robust_iv": "_static/basic_iv_example_nb.png",
"examples/R_double_ml_basic_iv": "_static/basic_iv_example_nb.png",
"examples/py_double_ml_robust_iv": "_static/robust_iv_example_nb.png",
"examples/py_double_ml_ssm": "_static/ssm_example_nb.svg",
"examples/R_double_ml_ssm": "_static/ssm_example_nb.svg",
"examples/py_double_ml_sensitivity_booking": "_static/dag_usecase_revised.png",
}

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

# config of sphinx gallery for examples
Expand All @@ -195,86 +195,86 @@

# intersphinx configuration
intersphinx_mapping = {
'python': ('https://docs.python.org/{.major}'.format(sys.version_info), None),
'sklearn': ('https://scikit-learn.org/stable/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'statsmodels': ('https://www.statsmodels.org/stable/', None),
"python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
"sklearn": ("https://scikit-learn.org/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"statsmodels": ("https://www.statsmodels.org/stable/", None),
}

linkcheck_ignore = [
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1093/ectj/utaa001',
"https://doi.org/10.1093/ectj/utaa001",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1111/ectj.12097',
"https://doi.org/10.1111/ectj.12097",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.2307/2171802',
"https://doi.org/10.2307/2171802",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.2307/1912705',
"https://doi.org/10.2307/1912705",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1093/ectj/utaa027',
"https://doi.org/10.1093/ectj/utaa027",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1111/rssb.12026',
"https://doi.org/10.1111/rssb.12026",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1111/rssa.12623',
"https://doi.org/10.1111/rssa.12623",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1146/annurev-economics-012315-015826',
"https://doi.org/10.1146/annurev-economics-012315-015826",
# Valid DOI, Causes 418 Client Error: unknown for url:...
'https://doi.org/10.1109/TIT.2014.2343629',
"https://doi.org/10.1109/TIT.2014.2343629",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1093/ectj/utaa001',
"https://doi.org/10.1093/ectj/utaa001",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1111/0034-6527.00321',
"https://doi.org/10.1111/0034-6527.00321",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1016/j.jeconom.2020.06.003',
"https://doi.org/10.1016/j.jeconom.2020.06.003",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1080/07350015.2021.1895815',
"https://doi.org/10.1080/07350015.2021.1895815",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1198/jbes.2010.07136',
"https://doi.org/10.1198/jbes.2010.07136",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1111/rssb.12348',
"https://doi.org/10.1111/rssb.12348",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1145/3460231.3474231',
"https://doi.org/10.1145/3460231.3474231",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://dl.acm.org/doi/10.1145/3447545.3451181',
"https://dl.acm.org/doi/10.1145/3447545.3451181",
# Pipelines notebook has to be reworked
'https://mlr3book.mlr-org.com/pipelines.html',
"https://mlr3book.mlr-org.com/pipelines.html",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1080/07350015.2023.2271071',
"https://doi.org/10.1080/07350015.2023.2271071",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1093/restud/rdt044',
"https://doi.org/10.1093/restud/rdt044",
# Valid DOI; 'Connection aborted.', RemoteDisconnected ...
'https://CRAN.R-project.org/package=mlr3learners',
"https://CRAN.R-project.org/package=mlr3learners",
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
'https://doi.org/10.1214/14-AOS1204',
"https://doi.org/10.1214/14-AOS1204",
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
'https://doi.org/10.1214/14-AOS1221',
"https://doi.org/10.1214/14-AOS1221",
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
'https://doi.org/10.1214/17-AOS1671',
"https://doi.org/10.1214/17-AOS1671",
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
'https://dx.doi.org/10.1214/13-AOS1161',
"https://dx.doi.org/10.1214/13-AOS1161",
# Valid DOI (error not replicable), Causes 404 Client Error: Not Found for url:...
'https://dx.doi.org/10.1214/14-AOS1230',
"https://dx.doi.org/10.1214/14-AOS1230",
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
'https://glmnet.stanford.edu/',
"https://glmnet.stanford.edu/",
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
'https://glmnet.stanford.edu/index.html',
"https://glmnet.stanford.edu/index.html",
# Valid URL Failed to establish a new connection: [Errno 111] Connection refused' ...
'https://glmnet.stanford.edu/reference/cv.glmnet.html',
"https://glmnet.stanford.edu/reference/cv.glmnet.html",
# Valid URL (error not replicable), Causes 409 Client Error: Too Many Requests for url
'http://dx.doi.org/10.2139/ssrn.3619201',
"http://dx.doi.org/10.2139/ssrn.3619201",
# Valid URL, Causes ConnectTimeoutError
'https://folia.unifr.ch/global/documents/306524',
"https://folia.unifr.ch/global/documents/306524",
# Valid DOI; Causes 403 Client Error: Forbidden for url:...
'https://doi.org/10.1146/annurev-economics-051520-021409',
"https://doi.org/10.1146/annurev-economics-051520-021409",
# Valdi DOI; Causes 504 Server Error: Gateway Time-out for ...
'https://doi.org/10.1017/CBO9781139060035.008'
"https://doi.org/10.1017/CBO9781139060035.008",
]

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

jupyter_execute_default_kernel = 'ir'
jupyter_execute_default_kernel = "ir"
jupyter_sphinx_linenos = False

# option to disable the execution of notebooks
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/R_double_ml_did.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
"\n",
"We'd like to thank the authors of the `did` package for R for maintaining a flexible interface for multi-period DiD models.\n",
"\n",
"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."
"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."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/py_double_ml_apo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"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."
"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."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/py_double_ml_cate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"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."
"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."
]
},
{
Expand Down Expand Up @@ -261,7 +261,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As univariate example estimate the [IRM Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLIRM.html)."
"As univariate example estimate the [IRM Model](https://docs.doubleml.org/stable/guide/models.html#interactive-regression-models-irm)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/py_double_ml_cate_plr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"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."
"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."
]
},
{
Expand Down Expand Up @@ -255,7 +255,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As univariate example estimate the [PLR Model](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLPLR.html)."
"As univariate example estimate the [PLR Model](https://docs.doubleml.org/stable/guide/models.html#partially-linear-regression-model-plr)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/py_double_ml_cvar.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"collapsed": false
},
"source": [
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.data.DoubleMLData.html) object."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/py_double_ml_multiway_cluster.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
},
"source": [
"### Data-Backend for Cluster Data\n",
"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."
"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."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/py_double_ml_pq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"collapsed": false
},
"source": [
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
"Let us generate $n=5000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/guide/data_backend.html#doublemldata) object."
]
},
{
Expand Down Expand Up @@ -740,7 +740,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let us generate $n=10000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/api/generated/doubleml.DoubleMLData.html) object."
"Let us generate $n=10000$ observations and convert them to a [DoubleMLData](https://docs.doubleml.org/stable/guide/data_backend.html#doublemldata) object."
]
},
{
Expand Down
1 change: 1 addition & 0 deletions doc/examples/py_double_ml_robust_iv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"id": "946cbbcf",
"metadata": {},
"source": [
"- 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",
"- Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., and Hansen, C. (2018). Double/debiased machine learning for\n",
"treatment and structural parameters. The Econometrics Journal, 21(1):C1–C68.\n",
"- Ma, Y. (2023). Identification-robust inference for the late with high-dimensional covariates. arXiv preprint arXiv:2302.09756.\n",
Expand Down
Loading