Skip to content

Remove <BLANKLINE> from docstrings #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2024
Merged
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
38 changes: 0 additions & 38 deletions causalpy/pymc_experiments.py
Original file line number Diff line number Diff line change
@@ -102,11 +102,6 @@ def print_coefficients(self, round_to=None) -> None:
... "progressbar": False
... }),
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
>>> result.print_coefficients(round_to=1) # doctest: +NUMBER
Model coefficients:
Intercept 1, 94% HDI [1, 1]
@@ -165,11 +160,6 @@ class PrePostFit(ExperimentalDesign, PrePostFitDataValidator):
... }
... ),
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
>>> result.summary(round_to=1) # doctest: +NUMBER
==================================Pre-Post Fit==================================
Formula: actual ~ 0 + a + g
@@ -396,11 +386,6 @@ class InterruptedTimeSeries(PrePostFit):
... }
... )
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
"""

expt_type = "Interrupted Time Series"
@@ -436,11 +421,6 @@ class SyntheticControl(PrePostFit):
... }
... ),
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
"""

expt_type = "Synthetic Control"
@@ -497,11 +477,6 @@ class DifferenceInDifferences(ExperimentalDesign, DiDDataValidator):
... }
... )
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
"""

def __init__(
@@ -793,11 +768,6 @@ class RegressionDiscontinuity(ExperimentalDesign, RDDataValidator):
... ),
... treatment_threshold=0.5,
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
"""

def __init__(
@@ -1207,10 +1177,6 @@ class PrePostNEGD(ExperimentalDesign, PrePostNEGDDataValidator):
... }
... )
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
>>> result.summary(round_to=1) # doctest: +NUMBER
==================Pretest/posttest Nonequivalent Group Design===================
Formula: post ~ 1 + C(group) + pre
@@ -1441,8 +1407,6 @@ class InstrumentalVariable(ExperimentalDesign, IVDataValidator):
... formula=formula,
... model=InstrumentalVariableRegression(sample_kwargs=sample_kwargs),
... )
<BLANKLINE>
<BLANKLINE>
"""

def __init__(
@@ -1568,8 +1532,6 @@ class InversePropensityWeighting(ExperimentalDesign, PropensityDataValidator):
... },
... ),
... )
<BLANKLINE>
<BLANKLINE>
"""

def __init__(
12 changes: 0 additions & 12 deletions causalpy/pymc_models.py
Original file line number Diff line number Diff line change
@@ -72,15 +72,11 @@ class ModelBuilder(pm.Model):
... }
... )
>>> model.fit(X, y)
<BLANKLINE>
<BLANKLINE>
Inference data...
>>> X_new = rng.normal(loc=0, scale=1, size=(20,2))
>>> model.predict(X_new)
<BLANKLINE>
Inference data...
>>> model.score(X, y)
<BLANKLINE>
r2 0.390344
r2_std 0.081135
dtype: float64
@@ -201,8 +197,6 @@ class WeightedSumFitter(ModelBuilder):
>>> y = np.asarray(sc['actual']).reshape((sc.shape[0], 1))
>>> wsf = WeightedSumFitter(sample_kwargs={"progressbar": False})
>>> wsf.fit(X,y)
<BLANKLINE>
<BLANKLINE>
Inference data...
""" # noqa: W605

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

@@ -313,8 +305,6 @@ class InstrumentalVariableRegression(ModelBuilder):
... "eta": 2,
... "lkj_sd": 2,
... })
<BLANKLINE>
<BLANKLINE>
Inference data...
"""

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

1 change: 0 additions & 1 deletion causalpy/skl_experiments.py
Original file line number Diff line number Diff line change
@@ -547,7 +547,6 @@ class RegressionDiscontinuity(ExperimentalDesign, RDDataValidator):
Formula: y ~ 1 + x + treated
Running variable: x
Threshold on running variable: 0.5
<BLANKLINE>
Results:
Discontinuity at threshold = 0.19
Model coefficients:
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ dependencies:
- numpy<1.26.0
- pandas
- patsy
- pymc>=5.14.0
- pymc>=5.15.1
- scikit-learn>=1
- scipy
- seaborn>=0.11.2