Class KMeansPlusPlus<O>
- java.lang.Object
-
- elki.clustering.kmeans.initialization.AbstractKMeansInitialization
-
- elki.clustering.kmeans.initialization.KMeansPlusPlus<O>
-
- Type Parameters:
O
- Vector type
- All Implemented Interfaces:
KMeansInitialization
,KMedoidsInitialization<O>
@Title("K-means++") @Reference(authors="D. Arthur, S. Vassilvitskii", title="k-means++: the advantages of careful seeding", booktitle="Proc. 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2007)", url="http://dl.acm.org/citation.cfm?id=1283383.1283494", bibkey="DBLP:conf/soda/ArthurV07") public class KMeansPlusPlus<O> extends AbstractKMeansInitialization implements KMedoidsInitialization<O>
K-Means++ initialization for k-means.Reference:
D. Arthur, S. Vassilvitskii
k-means++: the advantages of careful seeding
Proc. 18th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2007)- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
KMeansPlusPlus.Instance<T>
Abstract instance implementing the weight handling.protected static class
KMeansPlusPlus.MedoidsInstance
Instance for k-medoids.protected static class
KMeansPlusPlus.NumberVectorInstance
Instance for k-means, number vector based.static class
KMeansPlusPlus.Par<V>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
Class logger.-
Fields inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
rnd
-
-
Constructor Summary
Constructors Constructor Description KMeansPlusPlus(RandomFactory rnd)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Choose initial meansDBIDs
chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
Choose initial means-
Methods inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
unboxVectors
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
-
Constructor Detail
-
KMeansPlusPlus
public KMeansPlusPlus(RandomFactory rnd)
Constructor.- Parameters:
rnd
- Random generator.
-
-
Method Detail
-
chooseInitialMeans
public double[][] chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Description copied from interface:KMeansInitialization
Choose initial means- Specified by:
chooseInitialMeans
in interfaceKMeansInitialization
- Parameters:
relation
- Relationk
- Parameter kdistance
- Distance function- Returns:
- List of chosen means for k-means
-
chooseInitialMedoids
public DBIDs chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
Description copied from interface:KMedoidsInitialization
Choose initial means- Specified by:
chooseInitialMedoids
in interfaceKMedoidsInitialization<O>
- Parameters:
k
- Parameter kids
- Candidate IDs.distQ
- Distance function- Returns:
- List of chosen means for k-means
-
-