From 3c4a3699eacdc0b3d2a35b852d9bdb0ab3ac268d Mon Sep 17 00:00:00 2001 From: pciturri Date: Mon, 24 Jul 2023 18:37:55 +0200 Subject: [PATCH] fixed negbinom boundaries for consistency plot --- floatcsep/extras.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/floatcsep/extras.py b/floatcsep/extras.py index 390d0a6..a18ccb3 100644 --- a/floatcsep/extras.py +++ b/floatcsep/extras.py @@ -879,9 +879,9 @@ def plot_negbinom_consistency_test(eval_results, normalize=False, axes=None, mean = res.test_distribution[1] upsilon = 1.0 - ((var - mean) / var) tau = (mean ** 2 / (var - mean)) - phigh = scipy.stats.nbinom.ppf((1 - percentile / 100.) / 2., tau, + plow = scipy.stats.nbinom.ppf((1 - percentile / 100.) / 2., tau, upsilon) - plow = scipy.stats.nbinom.ppf(1 - (1 - percentile / 100.) / 2., + phigh = scipy.stats.nbinom.ppf(1 - (1 - percentile / 100.) / 2., tau, upsilon) if not numpy.isinf(