This line of code creates a k-means model with 12 clusters:
kmeans = KMeans (k=12, seed=1)
What is the significance of “seed=1”?
- This sets the seed to a specific value, which is necessary to reproduce the k-means results
- This specifies that the first cluster centroid is set to sample #1
- This means that this is the first iteration of k-means. The seed value is incremented by 1 every time k-means is executed
Get All Week Quiz Answer: