Skip to content

Commit

Permalink
Update prior scaler
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlheureux committed Aug 1, 2024
1 parent b9fe4fd commit 405be75
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bambi/priors/scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ def scale_intercept(self, term):
def scale_common(self, term):
if term.prior.name != "Normal":
return

if term.data.ndim == 1:
mu = 0
if (
isinstance(self.model.family, (Bernoulli, Binomial))
and self.model.family.link["p"].name == "logit"
isinstance(self.model.family, (Bernoulli, Binomial))
and self.model.family.link["p"].name == "logit"
):
if term.kind == "interaction":
all_categoric = all(
Expand All @@ -107,8 +107,8 @@ def scale_common(self, term):
# Iterate over columns in the data
for i, value in enumerate(term.data.T):
if (
isinstance(self.model.family, (Bernoulli, Binomial))
and self.model.family.link["p"].name == "logit"
isinstance(self.model.family, (Bernoulli, Binomial))
and self.model.family.link["p"].name == "logit"
):
if term.kind == "interaction":
all_categoric = all(
Expand Down

0 comments on commit 405be75

Please sign in to comment.