org.ddogleg.clustering.kmeans
Class InitializePlusPlus
- java.lang.Object
-
- org.ddogleg.clustering.kmeans.InitializePlusPlus
-
- All Implemented Interfaces:
- InitializeKMeans_F64
public class InitializePlusPlus extends java.lang.Object implements InitializeKMeans_F64
Implementation of the seeding strategy described in [1]. A point is randomly selected from the list as the first seed. The remaining seeds are selected randomly based on the distance of each seed from their closest cluster.
[1] David Arthur and Sergei Vassilvitskii. 2007. k-means++: the advantages of careful seeding. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms (SODA '07). Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 1027-1035.
-
-
Constructor Summary
Constructors Constructor and Description InitializePlusPlus()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidinit(int pointDimension, long randomSeed)Initializes internal data structures.voidselectSeeds(java.util.List<double[]> points, java.util.List<double[]> seeds)
-
-
-
Method Detail
-
init
public void init(int pointDimension, long randomSeed)Description copied from interface:InitializeKMeans_F64Initializes internal data structures. Must be called first.- Specified by:
initin interfaceInitializeKMeans_F64- Parameters:
pointDimension- NUmber of degrees of freedom in each point.randomSeed- Seed for any random number generators used internally.
-
selectSeeds
public void selectSeeds(java.util.List<double[]> points, java.util.List<double[]> seeds)- Specified by:
selectSeedsin interfaceInitializeKMeans_F64- Parameters:
points- Set of points which is to be clustered.seeds- List full of points which will act as the initial seed for k-means.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG