Question: silhouette _ coefficients = [ ] for k in range ( 2 , 1 1 ) : kmeans = KMeans ( n _ clusters =

silhouette_coefficients =[]
for k in range (2,11) :
kmeans = KMeans (n_clusters =k, random_state =2)
kmeans.fit (pca8_df)
score = silhouette_score (pca8_df, kmeans.labels_)
silhouette_coefficients.append (score)
# Plotting the results:
plt.plot (range (2,11), silhouette_coefficients)
plt.xticks (range (2,11))
plt.xlabel ("Number of Clusters")
plt.ylabel ("Silhouette Coefficient")
plt.grid(True)
plt.show () From the PCA silhouette_coefficients plotting, how many clusters are suggested?
 silhouette_coefficients =[] for k in range (2,11) : kmeans = KMeans

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!