From 18b367db6fb20c5ce4592d253b6de00927001ac4 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 14 Apr 2023 01:47:59 +0200 Subject: [PATCH] Properly accumulate errors in `EvaluationResults` --- unimore_bda_6/analysis/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unimore_bda_6/analysis/base.py b/unimore_bda_6/analysis/base.py index 62428b1..f4c20e6 100644 --- a/unimore_bda_6/analysis/base.py +++ b/unimore_bda_6/analysis/base.py @@ -81,6 +81,8 @@ class EvaluationResults: def __add__(self, other: EvaluationResults) -> EvaluationResults: new = self.__class__() + new.absolute_error_total = self.absolute_error_total + other.absolute_error_total + new.squared_error_total = self.squared_error_total + other.squared_error_total for expected, value in self.confusion_matrix.items(): for predicted, amount in value.items(): new.confusion_matrix[expected][predicted] += amount