From 3c07f672ad6b92371b677895a2866763cfef1c37 Mon Sep 17 00:00:00 2001
From: quillotm
Date: Thu, 12 Aug 2021 14:30:52 +0200
Subject: [PATCH] Solve an error with the purity score.
---
volia/core/measures.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/volia/core/measures.py b/volia/core/measures.py
index 4e5e94a..8ade117 100644
--- a/volia/core/measures.py
+++ b/volia/core/measures.py
@@ -185,8 +185,9 @@ def purity_score(y_truth, y_hat):
count_matrix = compute_count_matrix(y_truth, y_hat)
- _, purity_cluster_score = compute_purity_score(count_matrix, 1)
- _, purity_class_score = cluster_purity = compute_purity_score(count_matrix, 0)
+
+ purity_cluster_score = compute_purity_score(count_matrix, 1)
+ purity_class_score = compute_purity_score(count_matrix, 0)
K = np.sqrt(purity_cluster_score * purity_class_score)
--
1.8.2.3