Back to problems

K-Means Clustering Implementation with Manual Initialization

Object-Oriented Programming · PayPal · Medium

Problem Build the k-means clustering algorithm from the ground up using an object-oriented approach. Your implementation should accept a user-provided dataset, group the data into a chosen number of clusters, and allow the user to manually specify the starting positions of the cluster centers. A skeleton for the class is given below. You must complete the methods so that they behave as described. Test case Dataset: [(1, 2), (2, 3), (3, 4), (8, 9), (9, 10), (10, 11)] Initial…

Checking your access…