Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4 - Programming and evaluation of clustering [25 marks] a. Write code to apply k-means to cluster 6 data points (1,1),(1,2),(1,3),(2,1), (2,2), and (4,3)
Question 4 - Programming and evaluation of clustering [25 marks] a. Write code to apply k-means to cluster 6 data points (1,1),(1,2),(1,3),(2,1), (2,2), and (4,3) to 2 clusters. Use the initial centroids (1,0) and (2,2). Display the resulting cluster labels of the data points, cluster centroids, number of iterations performed, and inertia. [10] b. Repeat part (a) by varying the initial centroids to obtain a different clustering scheme. That is, you need to find a set of initial centroids to produce cluster labels and cluster centroids that are different from the scheme of part (a). Show the resulting cluster labels and cluster centroids. [3] c. Write code to apply the silhouette method to determine the optimal number of clusters for the dataset in part (a). Use agglomerative hierarchical clustering, and plot the resulting silhouette coefficients for 2 to 5 clusters. [10] d. Using the resulting graph of part (c), determine the optimal number of clusters for the dataset. [2]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started