Pick up #batch_sample_num samples randomly from the trainning data.
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
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
Train a ML Model
Train a ML Model
: input train data storage
: validate data 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