diff --git a/kmeans_clustering.py b/kmeans_clustering.py index 60a12d0..bee1e12 100644 --- a/kmeans_clustering.py +++ b/kmeans_clustering.py @@ -30,7 +30,7 @@ # Applying KMeans to the dataset with the optimal number of cluster kmeans=KMeans(n_clusters= 5, init = 'k-means++', max_iter = 300, n_init = 10, random_state = 0) -y_kmeans = kmeans.fit_predict(X) +Y_Kmeans = kmeans.fit_predict(X) # Visualising the clusters @@ -50,4 +50,4 @@ plt.xlabel('Annual Income (k$)') plt.ylabel('Spending score (1-100)') plt.legend() -plt.show() \ No newline at end of file +plt.show()