Skip to content
Snippets Groups Projects
Commit 36da2162 authored by v.gramlich1's avatar v.gramlich1
Browse files

+1 on every contingency cell

parent 7269e186
No related branches found
No related tags found
1 merge request!302Draft: Resolve "Class-based Oversampling technique"
Pipeline #75856 passed
...@@ -155,10 +155,10 @@ class PlotOversamplingContingency(AbstractPlotClass): ...@@ -155,10 +155,10 @@ class PlotOversamplingContingency(AbstractPlotClass):
for threshold in range(self._min_threshold, self._max_threshold): for threshold in range(self._min_threshold, self._max_threshold):
for pred in predictions: for pred in predictions:
ta, fa, fb, tb = self._single_contingency(obs, pred, threshold) 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="ta", type=pred.type.values)] = ta + 1
contingency_array.loc[dict(thresholds=threshold, contingency_cell="fa", type=pred.type.values)] = fa 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 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 contingency_array.loc[dict(thresholds=threshold, contingency_cell="tb", type=pred.type.values)] = tb + 1
logging.info(f"{station}: finished") logging.info(f"{station}: finished")
return contingency_array return contingency_array
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment