Learn Before
Concept

Algorithm of K-means Clustering

  1. Randomly assign a number, from 1 to K, to each of the observations. These serve as initial cluster assignments for the observations.
  2. Iterate until the cluster assignments stop changing:
  • (a) For each of the K clusters, compute the cluster centroid. The kth cluster centroid is the vector of the p feature means for the observations in the kth cluster.
  • (b) Assign each observation to the cluster whose centroid is closest

0

3

Updated 2020-03-11

Tags

Data Science