Clustering, Data Analysis.
str(silhouette_avg)) data0["Clustering_Kmeans_Exp0_" + str(n_clusters)] = cluster_labels Output: Eksperimen 1 for n_clusters in range(3,6): kmeans = KMeans(n_clusters = n_clusters, random_state=0) cluster_labels = kmeans.fit_predict(data1) silhoutte_avg = silhouette_score(data1, cluster_labels)