Skip to content
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

Remove <BLANKLINE> from docstrings #346

Merged
merged 2 commits into from
Jun 5, 2024
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
38 changes: 0 additions & 38 deletions causalpy/pymc_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -396,11 +386,6 @@ class InterruptedTimeSeries(PrePostFit):
... }
... )
... )
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
"""

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

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

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

def __init__(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1441,8 +1407,6 @@ class InstrumentalVariable(ExperimentalDesign, IVDataValidator):
... formula=formula,
... model=InstrumentalVariableRegression(sample_kwargs=sample_kwargs),
... )
<BLANKLINE>
<BLANKLINE>
"""

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

def __init__(
Expand Down
12 changes: 0 additions & 12 deletions causalpy/pymc_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

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

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

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

Expand Down
1 change: 0 additions & 1 deletion causalpy/skl_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading