Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago