O
- Object type for kMedoids and kMedianspublic class FarthestPointsInitialMeans<O> extends AbstractKMeansInitialization<NumberVector> implements KMedoidsInitialization<O>
Modifier and Type | Class and Description |
---|---|
static class |
FarthestPointsInitialMeans.Parameterizer<O>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
dropfirst
Discard the first vector.
|
rnd
Constructor and Description |
---|
FarthestPointsInitialMeans(RandomFactory rnd,
boolean dropfirst)
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
|
public FarthestPointsInitialMeans(RandomFactory rnd, boolean dropfirst)
rnd
- Random generator.dropfirst
- Flag to discard the first vector.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 functionCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.