Skip to content

Commit 6999467

Browse files
committed
formatting
1 parent 1f954db commit 6999467

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

doubleml/did/did_cs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class DoubleMLDIDCS(LinearScoreMixin, DoubleML):
5959
Default is ``True``.
6060
6161
Examples
62-
-------- >>> import numpy as np
62+
--------
63+
>>> import numpy as np
6364
>>> import doubleml as dml
6465
>>> from doubleml.did.datasets import make_did_SZ2020
6566
>>> from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier

doubleml/plm/datasets/dgp_lplr_LZZ2020.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
_dml_data_alias = _get_dml_data_alias()
1111

1212

13-
def make_lplr_LZZ2020(
14-
n_obs=500, dim_x=20, alpha=0.5, return_type="DoubleMLData", balanced_r0=True, treatment="continuous"):
13+
def make_lplr_LZZ2020(n_obs=500, dim_x=20, alpha=0.5, return_type="DoubleMLData", balanced_r0=True, treatment="continuous"):
1514
r"""
1615
Generates synthetic data for a logistic partially linear regression model, as in Liu et al. (2021),
1716
designed for use in double/debiased machine learning applications.
@@ -48,6 +47,7 @@ def make_lplr_LZZ2020(
4847
4948
return_type : str, default="DoubleMLData"
5049
Determines the return format. One of:
50+
5151
- 'DoubleMLData' or DoubleMLData: returns a ``DoubleMLData`` object.
5252
- 'DataFrame', 'pd.DataFrame' or pd.DataFrame: returns a ``pandas.DataFrame``.
5353
- 'array', 'np.ndarray', 'np.array' or np.ndarray: returns tuple of numpy arrays (x, y, d, p).
@@ -60,6 +60,7 @@ def make_lplr_LZZ2020(
6060
treatment : str, default="continuous"
6161
Type of treatment variable. One of "continuous", "binary", or "binary_unbalanced".
6262
Determines how the treatment d is generated from a_0(x):
63+
6364
- "continuous": d = a_0(x) (continuous treatment).
6465
- "binary": d ~ Bernoulli( sigmoid(a_0(x) - mean(a_0(x))) ) .
6566
- "binary_unbalanced": d ~ Bernoulli( sigmoid(a_0(x)) ).

doubleml/plm/lplr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ class DoubleMLLPLR(NonLinearScoreMixin, DoubleML):
2828
2929
ml_M : estimator implementing ``fit()`` and ``predict_proba()``
3030
A machine learner implementing ``fit()`` and ``predict_proba()`` methods (e.g.
31-
:py:class:`sklearn.ensemble.RandomForestClassifier`) for the nuisance function
31+
:py:class:`sklearn.ensemble.RandomForestClassifier`) for the nuisance function
3232
:math:`M_0(D, X) = P[Y = 1 | D, X]`.
3333
3434
ml_t : estimator implementing ``fit()`` and ``predict()``
3535
A machine learner implementing ``fit()`` and ``predict()`` methods (e.g.
36-
:py:class:`sklearn.ensemble.RandomForestRegressor`) for the auxiliary regression
36+
:py:class:`sklearn.ensemble.RandomForestRegressor`) for the auxiliary regression
3737
used to predict log-odds :math:`t_0(X) = E[W | X]` where :math:`W = \\text{logit}(M_0(D, X))`.
3838
3939
ml_m : estimator implementing ``fit()`` and ``predict()`` or ``predict_proba()``

0 commit comments

Comments
 (0)