How does Mini-Batch K-Means update cluster centroids compared to standard batch K-Means?

Last updated 11 November 2026

  • Standard (Lloyd) K-Means assigns all n points, then sets each centroid to the exact mean of its points, costing O(nkd) per pass.

  • Mini-Batch K-Means samples b points, assigns them, and moves each centroid toward its points: c_j ← (1 − η)·c_j + η·x with η = 1/n_j, where n_j counts points seen so far.

  • This is a running average (SGD on the k-means objective). Updates shrink as counts grow, which stabilizes convergence.

  • https://www.geeksforgeeks.org/machine-learning/ml-mini-batch-k-means-clustering-algorithm/
  • https://metricgate.com/docs/mini-batch-k-means/
  • https://docs.huihoo.com/scikit-learn/0.20/modules/clustering.html
All Clustering interview questions