Class RandomlyChosen<O>
- java.lang.Object
-
- elki.clustering.kmeans.initialization.AbstractKMeansInitialization
-
- elki.clustering.kmeans.initialization.RandomlyChosen<O>
-
- Type Parameters:
O
- Vector type
- All Implemented Interfaces:
KMeansInitialization
,KMedoidsInitialization<O>
@Reference(authors="D. J. McRae",title="MIKCA: A FORTRAN IV Iterative K-Means Cluster Analysis Program",booktitle="Behavioral Science 16(4)",bibkey="journals/misc/McRae71") @Reference(authors="E. W. Forgy",title="Cluster analysis of multivariate data: efficiency versus interpretability of classifications",booktitle="Biometrics 21(3)",bibkey="journals/biometrics/Forgy65") @Reference(authors="M. R. Anderberg",title="Nonhierarchical Clustering Methods",booktitle="Cluster Analysis for Applications",bibkey="books/academic/Anderberg73/Ch7") public class RandomlyChosen<O> extends AbstractKMeansInitialization implements KMedoidsInitialization<O>
Initialize K-means by randomly choosing k existing elements as initial cluster centers.Reference:
D. J. McRae
MIKCA: A FORTRAN IV Iterative K-Means Cluster Analysis Program
Behavioral Science 16(4)E. W. Forgy
Cluster analysis of multivariate data: efficiency versus interpretability of classifications
Abstract published in Biometrics 21(3)M. R. Anderberg
Hierarchical Clustering Methods
Cluster Analysis for ApplicationsThis initialization is often attributed to Forgy (but this is also debated), but we were unable to verify neither McRae (not available online?) nor Forgy so far (apparently, only an abstract is available in print, so we mostly can rely on indirect references, such as Anderberg).
- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RandomlyChosen.Par<V>
Parameterization class.
-
Field Summary
-
Fields inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
rnd
-
-
Constructor Summary
Constructors Constructor Description RandomlyChosen(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> distance)
Choose initial means-
Methods inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
unboxVectors
-
-
-
-
Constructor Detail
-
RandomlyChosen
public RandomlyChosen(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> distance)
Description copied from interface:KMedoidsInitialization
Choose initial means- Specified by:
chooseInitialMedoids
in interfaceKMedoidsInitialization<O>
- Parameters:
k
- Parameter kids
- Candidate IDs.distance
- Distance function- Returns:
- List of chosen means for k-means
-
-