Compute the objective values of all samples, which is measured by the distance from a sample to its closest center.
Compute the objective values of all samples, which is measured by the distance from a sample to its closest center.
: the trainning dataset
: the epoch number
: context of this task
: context of this task
Pick up K samples as initial centers randomly, and push them to PS.
Pick up K samples as initial centers randomly, and push them to PS.
: trainning data storage, the cluster center candidates
Upate the centers with a mini batch samples, first find the closest center for each sample.
Upate the centers with a mini batch samples, first find the closest center for each sample. Second each sample is used to update its closest center using the per-center learning rate.
: the samples picked up for mini batch updation
: the array sotres the number of samples of each center
Pick up #batch_sample_num samples randomly from the trainning data.
Train a KMeans Model
Train a KMeans Model
: trainning dataset storage
: a learned model
Each epoch updation is performed in three steps.
Each epoch updation is performed in three steps. First, pull the centers updated by last epoch from PS. Second, a mini batch of size batch_sample_num is sampled. Third, update the centers in a mini-batch way.
: the trainning data storage
: the array caches the number of samples per center
Kmeans is clustering algorithm, which find the closest center of each instance. This is the learner class of kmeans.