Question: Task 2 The dataset we are going to use has 1 0 0 0 entries with unknown number of clusters ( download data _ Kclusters.txt
Task
The dataset we are going to use has entries with unknown number of clusters download
dataKclusters.txt from Blackboard Use the Elbow Method to find the optimum value for and show
the results for clustering using the optimum You can use the following lines to plot the elbow.
Page of
WCSS
range
for thisk in K:
kmeanModel KMeans clusters thisk
kmeanModel.fit X
WCSSappend kmeanModelinertia
# Plot the elbow
pltfigure
pltplotK wCSSbx
pltxlabelk
pltylabelWCSS
plttitleThe Elbow Method showing the optimal k
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
