From baab800220e0db90683164c366d728775f92273f Mon Sep 17 00:00:00 2001 From: Kapitan Date: Mon, 17 Jan 2022 16:30:03 +0100 Subject: [PATCH] Zad3 TODOs --- zad3/zad3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zad3/zad3.py b/zad3/zad3.py index 154f2db..0817f95 100644 --- a/zad3/zad3.py +++ b/zad3/zad3.py @@ -77,7 +77,7 @@ def calc_length(a, b): return (b[0]-a[0])**2+(b[1]-a[1])**2 -def init_centroids(data, k, method='forgy'): +def init_centroids(data, k, method='forgy'): #TODO: Add k-means++ and Random Partition match method: case 'forgy': return sample(data, k) @@ -119,7 +119,7 @@ def main(): kmeans_data = {} for k in range(2, 21): kmeans_with_err = [] - for _ in range(10): + for _ in range(100): all_data = [] centroids = init_centroids(data, k) clusters = {}