Skip to content

Commit 22a5d79

Browse files
authored
Merge pull request #346 from pymc-labs/blankline
Remove `<BLANKLINE>` from docstrings
2 parents 040f20d + 298deb1 commit 22a5d79

File tree

4 files changed

+1
-52
lines changed

4 files changed

+1
-52
lines changed

causalpy/pymc_experiments.py

-38
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ def print_coefficients(self, round_to=None) -> None:
102102
... "progressbar": False
103103
... }),
104104
... )
105-
<BLANKLINE>
106-
<BLANKLINE>
107-
<BLANKLINE>
108-
<BLANKLINE>
109-
<BLANKLINE>
110105
>>> result.print_coefficients(round_to=1) # doctest: +NUMBER
111106
Model coefficients:
112107
Intercept 1, 94% HDI [1, 1]
@@ -165,11 +160,6 @@ class PrePostFit(ExperimentalDesign, PrePostFitDataValidator):
165160
... }
166161
... ),
167162
... )
168-
<BLANKLINE>
169-
<BLANKLINE>
170-
<BLANKLINE>
171-
<BLANKLINE>
172-
<BLANKLINE>
173163
>>> result.summary(round_to=1) # doctest: +NUMBER
174164
==================================Pre-Post Fit==================================
175165
Formula: actual ~ 0 + a + g
@@ -396,11 +386,6 @@ class InterruptedTimeSeries(PrePostFit):
396386
... }
397387
... )
398388
... )
399-
<BLANKLINE>
400-
<BLANKLINE>
401-
<BLANKLINE>
402-
<BLANKLINE>
403-
<BLANKLINE>
404389
"""
405390

406391
expt_type = "Interrupted Time Series"
@@ -436,11 +421,6 @@ class SyntheticControl(PrePostFit):
436421
... }
437422
... ),
438423
... )
439-
<BLANKLINE>
440-
<BLANKLINE>
441-
<BLANKLINE>
442-
<BLANKLINE>
443-
<BLANKLINE>
444424
"""
445425

446426
expt_type = "Synthetic Control"
@@ -497,11 +477,6 @@ class DifferenceInDifferences(ExperimentalDesign, DiDDataValidator):
497477
... }
498478
... )
499479
... )
500-
<BLANKLINE>
501-
<BLANKLINE>
502-
<BLANKLINE>
503-
<BLANKLINE>
504-
<BLANKLINE>
505480
"""
506481

507482
def __init__(
@@ -793,11 +768,6 @@ class RegressionDiscontinuity(ExperimentalDesign, RDDataValidator):
793768
... ),
794769
... treatment_threshold=0.5,
795770
... )
796-
<BLANKLINE>
797-
<BLANKLINE>
798-
<BLANKLINE>
799-
<BLANKLINE>
800-
<BLANKLINE>
801771
"""
802772

803773
def __init__(
@@ -1207,10 +1177,6 @@ class PrePostNEGD(ExperimentalDesign, PrePostNEGDDataValidator):
12071177
... }
12081178
... )
12091179
... )
1210-
<BLANKLINE>
1211-
<BLANKLINE>
1212-
<BLANKLINE>
1213-
<BLANKLINE>
12141180
>>> result.summary(round_to=1) # doctest: +NUMBER
12151181
==================Pretest/posttest Nonequivalent Group Design===================
12161182
Formula: post ~ 1 + C(group) + pre
@@ -1441,8 +1407,6 @@ class InstrumentalVariable(ExperimentalDesign, IVDataValidator):
14411407
... formula=formula,
14421408
... model=InstrumentalVariableRegression(sample_kwargs=sample_kwargs),
14431409
... )
1444-
<BLANKLINE>
1445-
<BLANKLINE>
14461410
"""
14471411

14481412
def __init__(
@@ -1568,8 +1532,6 @@ class InversePropensityWeighting(ExperimentalDesign, PropensityDataValidator):
15681532
... },
15691533
... ),
15701534
... )
1571-
<BLANKLINE>
1572-
<BLANKLINE>
15731535
"""
15741536

15751537
def __init__(

causalpy/pymc_models.py

-12
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,11 @@ class ModelBuilder(pm.Model):
7272
... }
7373
... )
7474
>>> model.fit(X, y)
75-
<BLANKLINE>
76-
<BLANKLINE>
7775
Inference data...
7876
>>> X_new = rng.normal(loc=0, scale=1, size=(20,2))
7977
>>> model.predict(X_new)
80-
<BLANKLINE>
8178
Inference data...
8279
>>> model.score(X, y)
83-
<BLANKLINE>
8480
r2 0.390344
8581
r2_std 0.081135
8682
dtype: float64
@@ -201,8 +197,6 @@ class WeightedSumFitter(ModelBuilder):
201197
>>> y = np.asarray(sc['actual']).reshape((sc.shape[0], 1))
202198
>>> wsf = WeightedSumFitter(sample_kwargs={"progressbar": False})
203199
>>> wsf.fit(X,y)
204-
<BLANKLINE>
205-
<BLANKLINE>
206200
Inference data...
207201
""" # noqa: W605
208202

@@ -259,8 +253,6 @@ class LinearRegression(ModelBuilder):
259253
... 'obs_indx': np.arange(rd.shape[0])
260254
... },
261255
... )
262-
<BLANKLINE>
263-
<BLANKLINE>
264256
Inference data...
265257
""" # noqa: W605
266258

@@ -313,8 +305,6 @@ class InstrumentalVariableRegression(ModelBuilder):
313305
... "eta": 2,
314306
... "lkj_sd": 2,
315307
... })
316-
<BLANKLINE>
317-
<BLANKLINE>
318308
Inference data...
319309
"""
320310

@@ -432,8 +422,6 @@ class PropensityScore(ModelBuilder):
432422
... 'obs_indx': np.arange(df.shape[0])
433423
... },
434424
... )
435-
<BLANKLINE>
436-
<BLANKLINE>
437425
Inference...
438426
""" # noqa: W605
439427

causalpy/skl_experiments.py

-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ class RegressionDiscontinuity(ExperimentalDesign, RDDataValidator):
547547
Formula: y ~ 1 + x + treated
548548
Running variable: x
549549
Threshold on running variable: 0.5
550-
<BLANKLINE>
551550
Results:
552551
Discontinuity at threshold = 0.19
553552
Model coefficients:

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
- numpy<1.26.0
1010
- pandas
1111
- patsy
12-
- pymc>=5.14.0
12+
- pymc>=5.15.1
1313
- scikit-learn>=1
1414
- scipy
1515
- seaborn>=0.11.2

0 commit comments

Comments
 (0)