Skip to content

Commit

Permalink
fix: negbinom consistency plots now have the correct boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloitu committed Nov 15, 2023
1 parent 1e2badb commit 3101a2f
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 3101a2f

Please sign in to comment.