Research Article

Sedimentary Environment Analysis by Grain-Size Data Based on Mini Batch K-Means Algorithm

Algorithm 1

Pseudocode of Mini Batch K-means algorithm for sediment sample data processing.
Mini Batch K-Means
Input: the dataset of grain size is X; the number of initial clusters k is 3; the iteration times is t;
   the mini batch is b.
Output: the set of clustering labels is C; the cluster label of every sample is c.
Initialize every sample label as .
;
for i = 1 to t do
              //extract randomly mini batch sub-samples from .
   for do
     ;    //calculate and storage the clustering central sample
   end for
   for do
     ;       //acquire the central sample
     ;    //update the per-center counter
     ;      //get the real-time per-center learning rates
     ; //take gradient step
   end for
end for