Skip to content

Commit

Permalink
fix: negbinom consistency plots now have the correct boundaries (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloitu authored Nov 16, 2023
1 parent 65451fb commit d764e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions csep/utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,9 +1856,9 @@ def plot_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)

# empirical distributions
Expand Down

0 comments on commit d764e5f

Please sign in to comment.