Class MiniBatchKMeansClusterer<T extends Clusterable>

    • Constructor Detail

      • MiniBatchKMeansClusterer

        public MiniBatchKMeansClusterer​(int k,
                                        int maxIterations,
                                        int batchSize,
                                        int initIterations,
                                        int initBatchSize,
                                        int maxNoImprovementTimes,
                                        DistanceMeasure measure,
                                        org.apache.commons.rng.UniformRandomProvider random,
                                        KMeansPlusPlusClusterer.EmptyClusterStrategy emptyStrategy)
        Build a clusterer.
        Parameters:
        k - Number of clusters to split the data into.
        maxIterations - Maximum number of iterations to run the algorithm for all the points, The actual number of iterationswill be smaller than maxIterations * size / batchSize, where size is the number of points to cluster. Disabled if negative.
        batchSize - Batch size for training iterations.
        initIterations - Number of iterations allowed in order to find out the best initial centers.
        initBatchSize - Batch size for initializing the clusters centers. A value of 3 * batchSize should be suitable in most cases.
        maxNoImprovementTimes - Maximum number of iterations during which no improvement is occuring. A value of 10 is suitable in most cases.
        measure - Distance measure.
        random - Random generator.
        emptyStrategy - Strategy for handling empty clusters that may appear during algorithm iterations.