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 = {}