array = np.random.random_sample(100)
labels = np.random.choice((0, 1), 100)
vals, tags = self.experimentLogger.get_classification_metrics(array, labels,
metric=("roc-auc", "pr-score"))
self.assertTrue("roc-auc" in tags and "pr-score" in tags, "Did not get all classification metrics")
After Change
ret_dict = get_classification_metrics(array, labels, metric=("roc-auc", "pr-score"))
vals = list(ret_dict.values())
self.assertTrue("roc-auc" in ret_dict and "pr-score" in ret_dict, "Did not get all classification metrics")
self.assertTrue(vals[0] >= 0 and vals[0] <= 1