From 1b40328766232a748a37ad3951447bc14e300337 Mon Sep 17 00:00:00 2001 From: Vedant Bahel Date: Fri, 25 Jun 2021 11:01:16 +0530 Subject: [PATCH] Variable name error "Y_Kmeans: used in visualization code whereas "y_kemans" used in kmeans code --- kmeans_clustering.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()