From 36da21628b064288df7bc9f9318124594fa97d4c Mon Sep 17 00:00:00 2001 From: "v.gramlich1" <v.gramlichfz-juelich.de> Date: Tue, 17 Aug 2021 11:40:35 +0200 Subject: [PATCH] +1 on every contingency cell --- mlair/plotting/postprocessing_plotting.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index da477718..c6ec6655 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -155,10 +155,10 @@ class PlotOversamplingContingency(AbstractPlotClass): for threshold in range(self._min_threshold, self._max_threshold): for pred in predictions: ta, fa, fb, tb = self._single_contingency(obs, pred, threshold) - contingency_array.loc[dict(thresholds=threshold, contingency_cell="ta", type=pred.type.values)] = ta - contingency_array.loc[dict(thresholds=threshold, contingency_cell="fa", type=pred.type.values)] = fa - contingency_array.loc[dict(thresholds=threshold, contingency_cell="fb", type=pred.type.values)] = fb - contingency_array.loc[dict(thresholds=threshold, contingency_cell="tb", type=pred.type.values)] = tb + contingency_array.loc[dict(thresholds=threshold, contingency_cell="ta", type=pred.type.values)] = ta + 1 + contingency_array.loc[dict(thresholds=threshold, contingency_cell="fa", type=pred.type.values)] = fa + 1 + contingency_array.loc[dict(thresholds=threshold, contingency_cell="fb", type=pred.type.values)] = fb + 1 + contingency_array.loc[dict(thresholds=threshold, contingency_cell="tb", type=pred.type.values)] = tb + 1 logging.info(f"{station}: finished") return contingency_array -- GitLab