Skip to content

Commit

Permalink
New ordered name (#724)
Browse files Browse the repository at this point in the history
* Replace univariate_ordered with ordered

* pin numpy<1.26.0
  • Loading branch information
tomicapretto authored Sep 21, 2023
1 parent bbc2cb1 commit 169564f
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 140 deletions.
2 changes: 1 addition & 1 deletion bambi/priors/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def scale_threshold(self):
"Normal",
mu=mu,
sigma=1,
transform=pm.distributions.transforms.univariate_ordered,
transform=pm.distributions.transforms.ordered,
)
elif isinstance(self.model.family, StoppingRatio):
threshold = self.model.components["threshold"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
"arviz>=0.12.0",
"formulae>=0.5.0",
"graphviz",
"numpy>1.22",
"numpy>1.22,<1.26.0",
"pandas>=1.0.0",
"pymc>=5.5.0",
"pytensor>=2.12.3",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_built_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,11 @@ def test_cumulative_family_priors(inhaler):
"Normal",
mu=[-0.5, 0, 0.5],
sigma=1.5,
transform=pm.distributions.transforms.univariate_ordered,
transform=pm.distributions.transforms.ordered,
)
}
model = bmb.Model(
"rating ~ period + carry + treat", inhaler, family="cumulative", priors=priors
"rating ~ 0 + period + carry + treat", inhaler, family="cumulative", priors=priors
)
model.fit(tune=100, draws=100)

Expand Down
Loading

0 comments on commit 169564f

Please sign in to comment.