Search code examples
pythonmachine-learningscikit-learncluster-analysisk-means

Can I use shuffle = False instead of random_state in KMeans


Instead of using:

kmeans = KMeans(n_clusters = i, init = 'k-means++', random_state = 42)

I want to use:

kmeans = KMeans(n_clusters = i, init = 'k-means++', shuffle = False)

Is it OK? or Wrong?


Solution

  • its wrong as far as i understand , because there is no such a parameter Shuffle in sklearn for k means check K means documentation for all parameters you need.

    To understand better what is random state , you fix its value to reproduce all calculations you`ve done next time .