O
- Vector type@Reference(authors="D. Arthur, S. Vassilvitskii", title="k-means++: the advantages of careful seeding", booktitle="Proc. of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007", url="http://dx.doi.org/10.1145/1283383.1283494") public class KMeansPlusPlusInitialMeans<O> extends AbstractKMeansInitialization<NumberVector> implements KMedoidsInitialization<O>
D. Arthur, S. Vassilvitskii
k-means++: the advantages of careful seeding
In: Proc. of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms,
SODA 2007
Modifier and Type | Class and Description |
---|---|
static class |
KMeansPlusPlusInitialMeans.Parameterizer<V>
Parameterization class.
|
rnd
Constructor and Description |
---|
KMeansPlusPlusInitialMeans(RandomFactory rnd)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T extends NumberVector,V extends NumberVector> |
chooseInitialMeans(Database database,
Relation<T> relation,
int k,
NumberVectorDistanceFunction<? super T> distanceFunction,
NumberVector.Factory<V> factory)
Choose initial means
|
DBIDs |
chooseInitialMedoids(int k,
DBIDs ids,
DistanceQuery<? super O> distQ)
Choose initial means
|
protected <T> double |
initialWeights(WritableDoubleDataStore weights,
DBIDs ids,
T latest,
DistanceQuery<? super T> distQ)
Initialize the weight list.
|
protected <T> double |
updateWeights(WritableDoubleDataStore weights,
DBIDs ids,
T latest,
DistanceQuery<? super T> distQ)
Update the weight list.
|
public KMeansPlusPlusInitialMeans(RandomFactory rnd)
rnd
- Random generator.public <T extends NumberVector,V extends NumberVector> List<V> chooseInitialMeans(Database database, Relation<T> relation, int k, NumberVectorDistanceFunction<? super T> distanceFunction, NumberVector.Factory<V> factory)
KMeansInitialization
chooseInitialMeans
in interface KMeansInitialization<NumberVector>
T
- Input vector typeV
- Output vector typedatabase
- Database contextrelation
- Relationk
- Parameter kdistanceFunction
- Distance functionfactory
- Factory for output vectors.public DBIDs chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
KMedoidsInitialization
chooseInitialMedoids
in interface KMedoidsInitialization<O>
k
- Parameter kids
- Candidate IDs.distQ
- Distance functionprotected <T> double initialWeights(WritableDoubleDataStore weights, DBIDs ids, T latest, DistanceQuery<? super T> distQ)
T
- Object typeweights
- Weight listids
- IDslatest
- Added IDdistQ
- Distance queryprotected <T> double updateWeights(WritableDoubleDataStore weights, DBIDs ids, T latest, DistanceQuery<? super T> distQ)
T
- Object typeweights
- Weight listids
- IDslatest
- Added IDdistQ
- Distance queryCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.