1. Online K-means
step1: Initialize the cluster centers
,......,
in any way;
Create counters ,......,
and initialize them to zero;
Step2: Loop
Get new data point ;
Determine the closest center to
;
Update the number of points in that cluster: ;
Update the cluster center: ;
End loop
2. SGD variant
3. Mini-batch K-means
Initialization: mini-batch size , initialize
cluster centers
,......,
picked randomly from dataset
Loop for iterations
For each batch ,
examples pickes randomly from
:
For :
Get the closest center: to
;
Update the center count: ;
Update the cluster center:
End for
End loop
Reference