Skip to content

Commit 62a3c65

Browse files
committed
add api documentation for confounded data
1 parent 279230d commit 62a3c65

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

doc/api/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Dataset generators
6464
datasets.make_plr_turrell2018
6565
datasets.make_pliv_multiway_cluster_CKMS2021
6666
datasets.make_did_SZ2020
67+
datasets.make_confounded_plr_data
68+
datasets.make_confounded_irm_data
6769

6870
Score mixin classes for double machine learning models
6971
------------------------------------------------------

doc/examples/py_double_ml_sensitivity.ipynb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"cell_type": "markdown",
66
"metadata": {},
77
"source": [
8-
"# Python: Sensitivity Analysis\n",
8+
"# Python: DoubleSensitivity Analysis\n",
99
"\n",
10-
"This notebook illustrates the "
10+
"This notebook illustrates the sensitivity analysis tools with the partiallly linear regression model (PLR)."
1111
]
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": null,
15+
"execution_count": 1,
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
@@ -28,25 +28,34 @@
2828
"from lightgbm import LGBMRegressor, LGBMClassifier\n",
2929
"\n",
3030
"import doubleml as dml\n",
31-
"from doubleml.datasets import make_irm_data, make_conf_irm_data"
31+
"from doubleml.datasets import make_confounded_plr_data"
3232
]
3333
},
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
3737
"metadata": {},
3838
"outputs": [],
39-
"source": [
40-
" dpg_dict = make_conf_irm_data(cf_y=cf_y, cf_d=cf_d)\n",
41-
" x_cols = [f'X{i + 1}' for i in np.arange(dpg_dict['x'].shape[1])]\n",
42-
" data = pd.DataFrame(np.column_stack((dpg_dict['x'], dpg_dict['y'], dpg_dict['d'])),\n",
43-
" columns=x_cols + ['y', 'd'])"
44-
]
39+
"source": []
4540
}
4641
],
4742
"metadata": {
43+
"kernelspec": {
44+
"display_name": "dml_dev",
45+
"language": "python",
46+
"name": "python3"
47+
},
4848
"language_info": {
49-
"name": "python"
49+
"codemirror_mode": {
50+
"name": "ipython",
51+
"version": 3
52+
},
53+
"file_extension": ".py",
54+
"mimetype": "text/x-python",
55+
"name": "python",
56+
"nbconvert_exporter": "python",
57+
"pygments_lexer": "ipython3",
58+
"version": "3.11.2"
5059
},
5160
"orig_nbformat": 4
5261
},

doc/guide/basics.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ other half of observations indexed with :math:`i \in I`
111111
return psi_a, psi_b
112112
113113
.. ipython:: python
114+
:okwarning:
114115
115116
from doubleml import DoubleMLData
116117
from doubleml import DoubleMLPLR

0 commit comments

Comments
 (0)