pymc3/step_methods/step_sizes.py

Killed 52 out of 64 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 285

--- 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 287

--- 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 288

--- 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 289

--- 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 290

--- 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 292

--- 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 293

--- 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 294

--- 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 295

--- 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 298

--- 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 299

--- 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 300

--- 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.'