Remove debugging code from Matthews
@@ -23,9 +23,6 @@ class Correlation(Metric):
self._corr_fn = corr_fn
self.corr_type = corr_type
- self._history = [] # for debugging purposes more than anything else
- self._per_batch_history = []
-
def _correlation(self, labels, predictions):
corr = self._corr_fn(labels, predictions)
if self.corr_type in ['pearson', 'spearman']:
@@ -60,17 +57,9 @@ class Correlation(Metric):
predictions = list(predictions.flatten())
labels = list(labels.flatten())
- if hasattr(self, '_per_batch_history'):
- batch_corr = self._correlation(labels, predictions)
- self._per_batch_history.append(batch_corr)
-
self._predictions += predictions
self._labels += labels
- if hasattr(self, '_history'):
- corr = self._correlation(self._labels, self._predictions)
- self._history.append(corr)
-
def get_metric(self, reset=False):
correlation = self._correlation(self._labels, self._predictions)
if reset:
@@ -81,5 +70,3 @@ class Correlation(Metric):
def reset(self):
self._predictions = []
self._labels = []
- self._history = []
- self._per_batch_history = []
