bambi/priors.py
Killed 275 out of 289 mutantsSuspicious
Mutants that made the test suite take longer, but otherwise seemed okMutant 362
--- bambi/priors.py
+++ bambi/priors.py
@@ -40,7 +40,7 @@
"wald": genmod_families.InverseGaussian,
"negativebinomial": genmod_families.NegativeBinomial,
"poisson": genmod_families.Poisson,
- "t": None, # not implemented in statsmodels
+ "XXtXX": None, # not implemented in statsmodels
}
self.smfamily = fams[name] if name in fams.keys() else None
Mutant 368
--- bambi/priors.py
+++ bambi/priors.py
@@ -59,7 +59,7 @@
def __init__(self, name, scale=None, **kwargs):
self.name = name
self._auto_scale = True
- self.scale = scale
+ self.scale = None
self.args = {}
self.update(**kwargs)
Mutant 410
--- bambi/priors.py
+++ bambi/priors.py
@@ -188,7 +188,7 @@
class PriorScaler:
# Default is 'wide'. The wide prior sigma is sqrt(1/3) = .577 on the partial
# corr scale, which is the sigma of a flat prior over [-1,1].
- names = {"narrow": 0.2, "medium": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
+ names = {"XXnarrowXX": 0.2, "medium": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
def __init__(self, model, taylor):
self.model = model
Mutant 411
--- bambi/priors.py
+++ bambi/priors.py
@@ -188,7 +188,7 @@
class PriorScaler:
# Default is 'wide'. The wide prior sigma is sqrt(1/3) = .577 on the partial
# corr scale, which is the sigma of a flat prior over [-1,1].
- names = {"narrow": 0.2, "medium": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
+ names = {"narrow": 1.2, "medium": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
def __init__(self, model, taylor):
self.model = model
Mutant 412
--- bambi/priors.py
+++ bambi/priors.py
@@ -188,7 +188,7 @@
class PriorScaler:
# Default is 'wide'. The wide prior sigma is sqrt(1/3) = .577 on the partial
# corr scale, which is the sigma of a flat prior over [-1,1].
- names = {"narrow": 0.2, "medium": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
+ names = {"narrow": 0.2, "XXmediumXX": 0.4, "wide": 3 ** -0.5, "superwide": 0.8}
def __init__(self, model, taylor):
self.model = model
Mutant 479
--- bambi/priors.py
+++ bambi/priors.py
@@ -272,7 +272,7 @@
# p, q: corresponding shape parameters of beta distribution
mean = 0.5
variance = sigma_corr ** 2 / 4
- p = mean * (mean * (1 - mean) / variance - 1)
+ p = mean * (mean * (1 - mean) / variance + 1)
q = (1 - mean) * (mean * (1 - mean) / variance - 1)
# function to return central moments of rescaled beta distribution
Mutant 482
--- bambi/priors.py
+++ bambi/priors.py
@@ -273,7 +273,7 @@
mean = 0.5
variance = sigma_corr ** 2 / 4
p = mean * (mean * (1 - mean) / variance - 1)
- q = (1 - mean) * (mean * (1 - mean) / variance - 1)
+ q = (2 - mean) * (mean * (1 - mean) / variance - 1)
# function to return central moments of rescaled beta distribution
def moment(k):
Mutant 484
--- bambi/priors.py
+++ bambi/priors.py
@@ -273,7 +273,7 @@
mean = 0.5
variance = sigma_corr ** 2 / 4
p = mean * (mean * (1 - mean) / variance - 1)
- q = (1 - mean) * (mean * (1 - mean) / variance - 1)
+ q = (1 - mean) / (mean * (1 - mean) / variance - 1)
# function to return central moments of rescaled beta distribution
def moment(k):
Mutant 485
--- bambi/priors.py
+++ bambi/priors.py
@@ -273,7 +273,7 @@
mean = 0.5
variance = sigma_corr ** 2 / 4
p = mean * (mean * (1 - mean) / variance - 1)
- q = (1 - mean) * (mean * (1 - mean) / variance - 1)
+ q = (1 - mean) * (mean / (1 - mean) / variance - 1)
# function to return central moments of rescaled beta distribution
def moment(k):
Mutant 486
--- bambi/priors.py
+++ bambi/priors.py
@@ -273,7 +273,7 @@
mean = 0.5
variance = sigma_corr ** 2 / 4
p = mean * (mean * (1 - mean) / variance - 1)
- q = (1 - mean) * (mean * (1 - mean) / variance - 1)
+ q = (1 - mean) * (mean * (2 - mean) / variance - 1)
# function to return central moments of rescaled beta distribution
def moment(k):
Mutant 557
--- bambi/priors.py
+++ bambi/priors.py
@@ -323,7 +323,7 @@
# add to intercept prior
index = list(self.priors.keys())
mu -= np.dot(means, self.stats["mean_x"][index])
- sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 2)) ** 0.5
+ sigma = (sigma ** 2 + np.dot(sigmas ** 3, self.stats["mean_x"][index] ** 2)) ** 0.5
return mu, sigma
Mutant 559
--- bambi/priors.py
+++ bambi/priors.py
@@ -323,7 +323,7 @@
# add to intercept prior
index = list(self.priors.keys())
mu -= np.dot(means, self.stats["mean_x"][index])
- sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 2)) ** 0.5
+ sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] * 2)) ** 0.5
return mu, sigma
Mutant 560
--- bambi/priors.py
+++ bambi/priors.py
@@ -323,7 +323,7 @@
# add to intercept prior
index = list(self.priors.keys())
mu -= np.dot(means, self.stats["mean_x"][index])
- sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 2)) ** 0.5
+ sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 3)) ** 0.5
return mu, sigma
Mutant 562
--- bambi/priors.py
+++ bambi/priors.py
@@ -323,7 +323,7 @@
# add to intercept prior
index = list(self.priors.keys())
mu -= np.dot(means, self.stats["mean_x"][index])
- sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 2)) ** 0.5
+ sigma = (sigma ** 2 + np.dot(sigmas ** 2, self.stats["mean_x"][index] ** 2)) ** 1.5
return mu, sigma