Last answered:

05 Oct 2023

Posted on:

05 Oct 2023

0

'KMeans' object is not callable

hello,

how can I solve this problem? 

2 answers ( 0 marked as helpful)
Instructor
Posted on:

05 Oct 2023

1

Hey Tahmina,


Thank you for reaching out!


Could you try the following:

1. Restart the kernel of your notebook by navigating to Kernel -> Restart and then selecting Yes. Then, run the cells again in order.

2. If the above doesn't help, please change you code to read the following:

kmeans = KMeans(n_clusters=2)

3. If none of the above solves the problem, could you please let me know which version of sklearn you are using. You can do this by executing the following:

import sklearn
sklearn.__version__

Kind regards,

365 Hristina

Posted on:

05 Oct 2023

0

Thank you Hristina!

Submit an answer