From 8be936e3836a56ec38af43e3d147d9c1cced59a0 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 8 Aug 2024 11:59:33 +0400 Subject: [PATCH] return work code --- pyFTS/partitioners/KMeans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFTS/partitioners/KMeans.py b/pyFTS/partitioners/KMeans.py index 1017ba3..e97dd26 100644 --- a/pyFTS/partitioners/KMeans.py +++ b/pyFTS/partitioners/KMeans.py @@ -87,9 +87,9 @@ class KMeansPartitioner(partitioner.Partitioner): kwargs = {'type': self.type, 'variable': self.variable} centroides = k_means(self.partitions, data, 1) - centroides = [v[0] for v in centroides] centroides.append(self.max) centroides.append(self.min) + centroides = list(set(centroides)) centroides.sort() for c in range(1, len(centroides) - 1): _name = self.get_name(c)