+ 2
Last project of DS With Python
Help please, Test 3,4 and 5 are failing and others are correct. I need your guys help! n = int(input()) X = [] for i in range(n): X.append([float(x) for x in input().split()]) from sklearn.preprocessing import StandardScaler from sklearn.cluster import KMeans import numpy as np from sklearn.metrics.pairwise import euclidean_distances scale = StandardScaler() scale.fit(X) X_scaled = scale.transform(X) kmeans = KMeans(n_clusters=2) kmeans.fit(X) s=(kmeans.cluster_centers_) for a in s: print(np.around(a,1))
1 Odpowiedź
0
Hi