Package moa.clusterers.kmeanspm
Class CoresetKMeans
- java.lang.Object
-
- moa.clusterers.kmeanspm.CoresetKMeans
-
public class CoresetKMeans extends Object
Provides methods to execute the k-means and k-means++ algorithm with a clustering. Citation: David Arthur, Sergei Vassilvitskii: k-means++: the advantages of careful seeding. SODA 2007: 1027-1035
-
-
Constructor Summary
Constructors Constructor Description CoresetKMeans()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<double[]>
generatekMeansPlusPlusCentroids(int k, List<double[]> input, Random random)
Generates the initial centroids like the k-means++ algorithm.static double
kMeans(List<double[]> centroids, List<double[]> input)
Executes the k-means algorithm with the given initial centroids until the costs converges.
-
-
-
Method Detail
-
generatekMeansPlusPlusCentroids
public static List<double[]> generatekMeansPlusPlusCentroids(int k, List<double[]> input, Random random)
Generates the initial centroids like the k-means++ algorithm.- Parameters:
k
- number of centroidsinput
- input clusteringrandom
- instance to generate a stream of pseudorandom numbers- Returns:
- the generated centroids
-
-