V
- Vector type@Alias(value="de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SampleKMeansInitialization") @Reference(authors="P. S. Bradley, U. M. Fayyad", title="Refining Initial Points for K-Means Clustering", booktitle="Proc. 15th Int. Conf. on Machine Learning (ICML 1998)", bibkey="DBLP:conf/icml/BradleyF98") public class SampleKMeansInitialization<V extends NumberVector> extends AbstractKMeansInitialization
Reference:
The idea of finding centers on a sample can be found in:
P. S. Bradley, U. M. Fayyad
Refining Initial Points for K-Means Clustering
Proc. 15th Int. Conf. on Machine Learning (ICML 1998)
But Bradley and Fayyad also suggest to repeat this multiple times. This implementation uses a single attempt only.
Modifier and Type | Class and Description |
---|---|
static class |
SampleKMeansInitialization.Parameterizer<V extends NumberVector>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private KMeans<V,?> |
innerkMeans
Variant of kMeans to use for initialization.
|
private double |
rate
Sample size.
|
rnd
Constructor and Description |
---|
SampleKMeansInitialization(RandomFactory rnd,
KMeans<V,?> innerkMeans,
double rate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
chooseInitialMeans(Database database,
Relation<? extends NumberVector> relation,
int k,
NumberVectorDistanceFunction<?> distanceFunction)
Choose initial means
|
unboxVectors
private KMeans<V extends NumberVector,?> innerkMeans
private double rate
public SampleKMeansInitialization(RandomFactory rnd, KMeans<V,?> innerkMeans, double rate)
rnd
- Random generator.innerkMeans
- Inner k-means algorithm.rate
- Sampling rate.public double[][] chooseInitialMeans(Database database, Relation<? extends NumberVector> relation, int k, NumberVectorDistanceFunction<?> distanceFunction)
KMeansInitialization
database
- Database contextrelation
- Relationk
- Parameter kdistanceFunction
- Distance functionCopyright © 2019 ELKI Development Team. License information.