Skip to content

Commit 83061e4

Browse files
committed
another fix
Signed-off-by: Nathaniel <[email protected]>
1 parent 1670af4 commit 83061e4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

causalpy/variable_selection_priors.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class SpikeAndSlabPrior:
8787
>>> import pymc as pm
8888
>>> from causalpy.variable_selection_priors import SpikeAndSlabPrior
8989
>>> spike_slab = SpikeAndSlabPrior(dims="features")
90-
>>> with pm.Model():
90+
>>> coords = {"features": ["a", "b", "c", "d", "e"]}
91+
>>> with pm.Model(coords=coords) as model:
9192
... beta = spike_slab.create_variable("beta")
9293
"""
9394

@@ -166,7 +167,8 @@ class HorseshoePrior:
166167
>>> import pymc as pm
167168
>>> from causalpy.variable_selection_priors import HorseshoePrior
168169
>>> horseshoe = HorseshoePrior(dims="features")
169-
>>> with pm.Model():
170+
>>> coords = {"features": ["a", "b", "c", "d", "e"]}
171+
>>> with pm.Model(coords=coords) as model:
170172
... beta = horseshoe.create_variable("beta")
171173
"""
172174

@@ -264,10 +266,11 @@ class VariableSelectionPrior:
264266
Example
265267
-------
266268
>>> import pymc as pm
267-
>>> from variable_selection_priors import VariableSelectionPrior
269+
>>> from causalpy.variable_selection_priors import VariableSelectionPrior
268270
>>> # Create spike-and-slab prior
269271
>>> vs_prior = VariableSelectionPrior("spike_and_slab")
270-
>>> with pm.Model() as model:
272+
>>> coords = {"features": ["a", "b", "c", "d", "e"]}
273+
>>> with pm.Model(coords=coords) as model:
271274
... # Create coefficients with variable selection
272275
... beta = vs_prior.create_prior(name="beta", n_params=5, dims="features")
273276
"""
@@ -374,7 +377,7 @@ def create_prior(
374377
-------
375378
>>> import pymc as pm
376379
>>> import pandas as pd
377-
>>> from variable_selection_priors import VariableSelectionPrior
380+
>>> from causalpy.variable_selection_priors import VariableSelectionPrior
378381
>>> vs_prior = VariableSelectionPrior("spike_and_slab")
379382
>>> with pm.Model() as model:
380383
... beta = vs_prior.create_prior("beta", n_params=4, dims="features")

0 commit comments

Comments
 (0)