Consider the following 1-D points (i.e., numbers): 0, 2, 4, 7,10. Your task is to apply the standard
k-means algorithm to partition these numbers into two clusters(i.e., k = 2). Use the following
pseudo-code for this problem:
. Initialize the prototypes
. Repeat until “convergence”
. Assign each sample to the cluster of the closest prototype.
. Recalculate each prototype as the mean of all the samples
belonging to that cluster.
A common approach to initialize the prototypes (clusterrepresentatives) is to use points that are most
distant from one another. For the numbers here, this means that theinitial prototypes p1 and p2 are at 0
and 10, respectively. Now follow
PayPal Gateway not configured
PayPal Gateway not configured