Skip to content

Commit 53f0fd0

Browse files
committed
fixed link and removed awkward round call
1 parent 11aa925 commit 53f0fd0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

causalpy/pymc_models.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
- LinearRegression model
66
77
Models are intended to be used from inside an experiment
8-
class (see :py:mod:`pymc_experiments.py<.pymc_experiments.py>` old
9-
link `pymc_experiments.py
10-
<https://causalpy.readthedocs.io/en/latest/api_pymc_experiments.html>`_).
8+
class (see :doc:`PyMC experiments</api_pymc_experiments>`).
119
This is why the examples require some extra
1210
manipulation input data, often to ensure `y` has the correct shape.
1311
@@ -181,11 +179,16 @@ def score(self, X, y) -> pd.Series:
181179
>>> X = rng.normal(loc=0, scale=1, size=(200, 2))
182180
>>> y = rng.normal(loc=0, scale=1, size=(200,))
183181
>>> model = MyToyModel(
184-
... sample_kwargs={"chains": 2, "draws": 2000, "progressbar": False}
182+
... sample_kwargs={
183+
... "chains": 2,
184+
... "draws": 2000,
185+
... "progressbar": False,
186+
... "random_seed": rng
187+
... }
185188
... )
186189
>>> model.fit(X, y)
187190
Inference...
188-
>>> round(model.score(X, y),2) # using round() to simplify doctest
191+
>>> model.score(X, y) # doctest: +NUMBER
189192
r2 0.34
190193
r2_std 0.02
191194
dtype: float64

0 commit comments

Comments
 (0)