pymc3/step_methods/step_sizes.py
Killed 52 out of 64 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 52
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -63,7 +63,7 @@
target_accept = self._target
# Try to find a reasonable interval for acceptable acceptance
# probabilities. Finding this was mostry trial and error.
- n_bound = min(100, len(accept))
+ n_bound = min(101, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
Mutant 54
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -64,7 +64,7 @@
# Try to find a reasonable interval for acceptable acceptance
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
- n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
+ n_good, n_bad = mean_accept / n_bound, (1 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
Mutant 55
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -64,7 +64,7 @@
# Try to find a reasonable interval for acceptable acceptance
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
- n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
+ n_good, n_bad = mean_accept * n_bound, (2 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
Mutant 56
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -64,7 +64,7 @@
# Try to find a reasonable interval for acceptable acceptance
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
- n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
+ n_good, n_bad = mean_accept * n_bound, (1 + mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
Mutant 57
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -64,7 +64,7 @@
# Try to find a reasonable interval for acceptable acceptance
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
- n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
+ n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) / n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
Mutant 59
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -65,7 +65,7 @@
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
- lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
+ lower, upper = stats.beta(n_good - 1, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
Mutant 60
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -65,7 +65,7 @@
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
- lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
+ lower, upper = stats.beta(n_good + 2, n_bad + 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
Mutant 61
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -65,7 +65,7 @@
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
- lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
+ lower, upper = stats.beta(n_good + 1, n_bad - 1).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
Mutant 62
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -65,7 +65,7 @@
# probabilities. Finding this was mostry trial and error.
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
- lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
+ lower, upper = stats.beta(n_good + 1, n_bad + 2).interval(0.95)
if target_accept < lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
Mutant 65
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -66,7 +66,7 @@
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
- if target_accept < lower or target_accept > upper:
+ if target_accept <= lower or target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
'number of tuning steps.'
Mutant 66
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -66,7 +66,7 @@
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
- if target_accept < lower or target_accept > upper:
+ if target_accept < lower or target_accept >= upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
'number of tuning steps.'
Mutant 67
--- pymc3/step_methods/step_sizes.py
+++ pymc3/step_methods/step_sizes.py
@@ -66,7 +66,7 @@
n_bound = min(100, len(accept))
n_good, n_bad = mean_accept * n_bound, (1 - mean_accept) * n_bound
lower, upper = stats.beta(n_good + 1, n_bad + 1).interval(0.95)
- if target_accept < lower or target_accept > upper:
+ if target_accept < lower and target_accept > upper:
msg = ('The acceptance probability does not match the target. It '
'is %s, but should be close to %s. Try to increase the '
'number of tuning steps.'