From 921da90a16626fd742dbc0d609db4d8537e3d5de Mon Sep 17 00:00:00 2001 From: Submissions from Jie Xu <59791286+SubmissionsIn@users.noreply.github.com> Date: Tue, 28 Feb 2023 15:18:40 +0800 Subject: [PATCH] Update metric.py --- metric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metric.py b/metric.py index eada084..840f7aa 100644 --- a/metric.py +++ b/metric.py @@ -1,4 +1,4 @@ -from sklearn.metrics import v_measure_score, adjusted_rand_score, accuracy_score +from sklearn.metrics import normalized_mutual_info_score, adjusted_rand_score, accuracy_score from sklearn.cluster import KMeans from scipy.optimize import linear_sum_assignment from torch.utils.data import DataLoader @@ -36,7 +36,7 @@ def purity(y_true, y_pred): def evaluate(label, pred): - nmi = v_measure_score(label, pred) + nmi = normalized_mutual_info_score(label, pred) ari = adjusted_rand_score(label, pred) acc = cluster_acc(label, pred) pur = purity(label, pred)