Repository: KIT-IAI/pyWATTS

Issue:
Execution on entire data as default for metric
**Describe the bug**
When using a summary for a metric (e.g. MAE) on a complete data set, ": complete" is added to its key due to line 91 in metric_base.py.

**To Reproduce**
Steps to reproduce the behavior:
Run metric on complete data set.

**Expected behavior**
The default should be that metrics are executed on the entire data set. Therefore, only deviations from this default (e.g. cutouts) should be noted in the key.

Discussion:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 373fece..bc043c7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@
 * Fixed wrong check of if summary should be returned in _run method of pipeline ([#157](https://github.com/KIT-IAI/pyWATTS/issues/157))
 * Fixed Pipeline.to_folder() for modules that store parameters in numpy format by adding a special JSON-encoder for types that are not json-serializable by default ([#175](https://github.com/KIT-IAI/pyWATTS/issues/175))
 * Added missing summaries to pywatts.summaries.__init__.py ([#183](https://github.com/KIT-IAI/pyWATTS/issues/183))
+* Naming in the Metric Summaries  ([#193](https://github.com/KIT-IAI/pyWATTS/issues/193))
 * Fixed wrong time dimension name in ComputationMode.Transform ([#199](https://github.com/KIT-IAI/pyWATTS/issues/199))
 * Fixed online execution of subpipeline ([#203](https://github.com/KIT-IAI/pyWATTS/issues/203))
 * Enable to store a Keras Model with custom objects as custom loss functions ([#17](https://github.com/KIT-IAI/pyWATTS/issues/17))
diff --git a/pywatts/summaries/metric_base.py b/pywatts/summaries/metric_base.py
index add7e07..dca38a5 100644
--- a/pywatts/summaries/metric_base.py
+++ b/pywatts/summaries/metric_base.py
@@ -88,7 +88,7 @@ class MetricBase(BaseSummary, ABC):
 
         y_ = y[self.offset:]
         kwargs_ = {key: value[self.offset:] for key, value in kwargs.items()}
-        self._transform({key: value for key, value in kwargs_.items()}, ": complete", summary, y_.values)
+        self._transform({key: value for key, value in kwargs_.items()}, "", summary, y_.values)
         for start, end in self.cuts:
             _kwargs = {key: value.loc[start:end] for key, value in kwargs_.items()}
             if not len(y_.loc[start:end].values) == 0:


Test patch:
diff --git a/tests/unit/summaries/metrics/test_mase.py b/tests/unit/summaries/metrics/test_mase.py
index eb2c464..9c783d0 100644
--- a/tests/unit/summaries/metrics/test_mase.py
+++ b/tests/unit/summaries/metrics/test_mase.py
@@ -39,7 +39,7 @@ class TestMase(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        expected_result = {'pred1: complete': (9 / 4) / (4/4)}
+        expected_result = {'pred1': (9 / 4) / (4/4)}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -56,7 +56,7 @@ class TestMase(BaseTestMetricBase, unittest.TestCase):
                                              pred1=test_data['predictCol1'],
                                              pred2=test_data['predictCol2'])
 
-        expected_result = {'gt: complete': 0, 'pred1: complete': (9 / 4) / (4/4), 'pred2: complete': (12 / 4) / (4/4)}
+        expected_result = {'gt': 0, 'pred1': (9 / 4) / (4/4), 'pred2': (12 / 4) / (4/4)}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -72,7 +72,7 @@ class TestMase(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                           pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": (9 / 4) / (4/4),
+        expected_result = {"pred1": (9 / 4) / (4/4),
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00" : (3 / 2) / (2/2)}
 
         self.assertEqual(test_result.k_v, expected_result)
diff --git a/tests/unit/summaries/metrics/test_max_error.py b/tests/unit/summaries/metrics/test_max_error.py
index c504d18..8c622ce 100644
--- a/tests/unit/summaries/metrics/test_max_error.py
+++ b/tests/unit/summaries/metrics/test_max_error.py
@@ -39,7 +39,7 @@ class TestMaxErr(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        expected_result = {'pred1: complete': 4}
+        expected_result = {'pred1': 4}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -56,7 +56,7 @@ class TestMaxErr(BaseTestMetricBase, unittest.TestCase):
                                              pred1=test_data['predictCol1'],
                                              pred2=test_data['predictCol2'])
 
-        expected_result = {'gt: complete': 0, 'pred1: complete': 4, 'pred2: complete': 6}
+        expected_result = {'gt': 0, 'pred1': 4, 'pred2': 6}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -72,7 +72,7 @@ class TestMaxErr(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                           pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": 4,
+        expected_result = {"pred1": 4,
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00" : 3}
 
         self.assertEqual(test_result.k_v, expected_result)
diff --git a/tests/unit/summaries/metrics/test_mean_abs_percentage_error.py b/tests/unit/summaries/metrics/test_mean_abs_percentage_error.py
index bc3c436..d0997eb 100644
--- a/tests/unit/summaries/metrics/test_mean_abs_percentage_error.py
+++ b/tests/unit/summaries/metrics/test_mean_abs_percentage_error.py
@@ -36,7 +36,7 @@ class TestMASE(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        self.assertEqual(test_result.k_v, {"pred1: complete": 3/2 * 100})
+        self.assertEqual(test_result.k_v, {"pred1": 3/2 * 100})
 
     def test_transform(self):
         time = pd.to_datetime(['2015-06-03 00:00:00', '2015-06-03 01:00:00',
@@ -50,7 +50,7 @@ class TestMASE(BaseTestMetricBase, unittest.TestCase):
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'], gt=test_data['testCol'],
                                           pred1=test_data['predictCol1'],
                                           pred2=test_data['predictCol2'])
-        expected_result = {"gt: complete": 0.0, "pred1: complete": 3/2 * 100, "pred2: complete": 23/8 * 100}
+        expected_result = {"gt": 0.0, "pred1": 3/2 * 100, "pred2": 23/8 * 100}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -66,7 +66,7 @@ class TestMASE(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                           pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": 3/2 * 100,
+        expected_result = {"pred1": 3/2 * 100,
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00" : (2/1 + 0/1)/2 * 100}
 
         self.assertEqual(test_result.k_v, expected_result)
diff --git a/tests/unit/summaries/metrics/test_mean_absolute_error.py b/tests/unit/summaries/metrics/test_mean_absolute_error.py
index b333a8e..1f83beb 100644
--- a/tests/unit/summaries/metrics/test_mean_absolute_error.py
+++ b/tests/unit/summaries/metrics/test_mean_absolute_error.py
@@ -40,7 +40,7 @@ class TestMAE(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        expected_result = {"pred1: complete": 2.6}
+        expected_result = {"pred1": 2.6}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -57,7 +57,7 @@ class TestMAE(BaseTestMetricBase, unittest.TestCase):
                                          pred1=test_data['predictCol1'],
                                          pred2=test_data['predictCol2'])
 
-        expected_result = {"gt: complete": 0.0, "pred1: complete": 2.6, "pred2: complete": 3.6}
+        expected_result = {"gt": 0.0, "pred1": 2.6, "pred2": 3.6}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -92,7 +92,7 @@ class TestMAE(BaseTestMetricBase, unittest.TestCase):
                                          pred1=test_data['predictCol1'],
                                          pred2=test_data['predictCol2'])
 
-        expected_result = {"gt: complete": 0.0, "pred1: complete": 2.6, "pred2: complete": 3.6}
+        expected_result = {"gt": 0.0, "pred1": 2.6, "pred2": 3.6}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -108,7 +108,7 @@ class TestMAE(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                              pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": 2.6,
+        expected_result = {"pred1": 2.6,
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00": 5 / 3}
 
         self.assertEqual(test_result.k_v, expected_result)
diff --git a/tests/unit/summaries/metrics/test_min_error.py b/tests/unit/summaries/metrics/test_min_error.py
index 2ba769e..30bee35 100644
--- a/tests/unit/summaries/metrics/test_min_error.py
+++ b/tests/unit/summaries/metrics/test_min_error.py
@@ -39,7 +39,7 @@ class TestMinErr(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        expected_result = {"pred1: complete": 0}
+        expected_result = {"pred1": 0}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -56,7 +56,7 @@ class TestMinErr(BaseTestMetricBase, unittest.TestCase):
                                              pred1=test_data['predictCol1'],
                                              pred2=test_data['predictCol2'])
 
-        expected_result = {"gt: complete": 0.0, "pred1: complete": 0, "pred2: complete": 1}
+        expected_result = {"gt": 0.0, "pred1": 0, "pred2": 1}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -72,7 +72,7 @@ class TestMinErr(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                           pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": 0,
+        expected_result = {"pred1": 0,
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00" : 0}
 
         self.assertEqual(test_result.k_v, expected_result)
diff --git a/tests/unit/summaries/metrics/test_root_mean_squared_error.py b/tests/unit/summaries/metrics/test_root_mean_squared_error.py
index 122b255..3b3acd5 100644
--- a/tests/unit/summaries/metrics/test_root_mean_squared_error.py
+++ b/tests/unit/summaries/metrics/test_root_mean_squared_error.py
@@ -39,7 +39,7 @@ class TestRMSE(BaseTestMetricBase, unittest.TestCase):
         np.testing.assert_equal(filter_mock.call_args[0][0], test_data["predictCol1"])
         np.testing.assert_equal(filter_mock.call_args[0][1], test_data["testCol"])
 
-        expected_result = {"pred1: complete": 3}
+        expected_result = {"pred1": 3}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -56,7 +56,7 @@ class TestRMSE(BaseTestMetricBase, unittest.TestCase):
                                           pred1=test_data['predictCol1'],
                                           pred2=test_data['predictCol2'])
 
-        expected_result = {"gt: complete": 0.0, "pred1: complete": 3.0, "pred2: complete": 4.0}
+        expected_result = {"gt": 0.0, "pred1": 3.0, "pred2": 4.0}
 
         self.assertEqual(test_result.k_v, expected_result)
 
@@ -72,7 +72,7 @@ class TestRMSE(BaseTestMetricBase, unittest.TestCase):
         self.metric.set_params(cuts=[(pd.Timestamp('2015-06-03 01:00:00'), pd.Timestamp('2015-06-03 03:00:00'))])
         test_result = self.metric.transform(file_manager=MagicMock(), y=test_data['testCol'],
                                           pred1=test_data['predictCol1'])
-        expected_result = {"pred1: complete": 3,
+        expected_result = {"pred1": 3,
                            "pred1: Cut from 2015-06-03 01:00:00 to 2015-06-03 03:00:00" : np.sqrt(13/3)}
 
         self.assertEqual(test_result.k_v, expected_result)