Problem in K-Means code

The link to my code is - https://drive.google.com/drive/folders/1t2ZFeaFpDL2Iy-PHvZWkA99B8WBTI6Pi?usp=sharing . When I am trying to execute the last block of my code(graph plotting part), I am not all 5 clusters on the graph. I have run my code again and again. Please tell where is the mistake.

Hi @abhaygarg2001,

Is this the output you were trying to achieve?
image

If yes, then the only mistake you made was that you declared k=5 and then used the variable “kx” everywhere in the notebook instead of “k”.

Hope this helps!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

hey @abhaygarg2001 ,
we see that you have re-opened this doubt , is there something left to be resolved ?