V
- Vector typepublic class SampleKMeansInitialization<V extends NumberVector> extends AbstractKMeansInitialization<V>
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 |
---|---|
<T extends V,O extends NumberVector> |
chooseInitialMeans(Database database,
Relation<T> relation,
int k,
NumberVectorDistanceFunction<? super T> distanceFunction,
NumberVector.Factory<O> factory)
Choose initial means
|
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 <T extends V,O extends NumberVector> List<O> chooseInitialMeans(Database database, Relation<T> relation, int k, NumberVectorDistanceFunction<? super T> distanceFunction, NumberVector.Factory<O> factory)
KMeansInitialization
T
- Input vector typeO
- Output vector typedatabase
- Database contextrelation
- Relationk
- Parameter kdistanceFunction
- Distance functionfactory
- Factory for output vectors.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.