O
- Object type for kmedoids and kmedianspublic class FarthestSumPointsInitialMeans<O> extends FarthestPointsInitialMeans<O>
Modifier and Type | Class and Description |
---|---|
static class |
FarthestSumPointsInitialMeans.Parameterizer<V>
Parameterization class.
|
dropfirst
rnd
Constructor and Description |
---|
FarthestSumPointsInitialMeans(RandomFactory rnd,
boolean dropfirst)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
chooseInitialMeans(Database database,
Relation<? extends NumberVector> relation,
int k,
NumberVectorDistanceFunction<?> distanceFunction)
Choose initial means
|
DBIDs |
chooseInitialMedoids(int k,
DBIDs ids,
DistanceQuery<? super O> distQ)
Choose initial means
|
unboxVectors
public FarthestSumPointsInitialMeans(RandomFactory rnd, boolean dropfirst)
rnd
- Random generator.dropfirst
- Flag to discard the first vector.public double[][] chooseInitialMeans(Database database, Relation<? extends NumberVector> relation, int k, NumberVectorDistanceFunction<?> distanceFunction)
KMeansInitialization
chooseInitialMeans
in interface KMeansInitialization
chooseInitialMeans
in class FarthestPointsInitialMeans<O>
database
- Database contextrelation
- Relationk
- Parameter kdistanceFunction
- Distance functionpublic DBIDs chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
KMedoidsInitialization
chooseInitialMedoids
in interface KMedoidsInitialization<O>
chooseInitialMedoids
in class FarthestPointsInitialMeans<O>
k
- Parameter kids
- Candidate IDs.distQ
- Distance functionCopyright © 2019 ELKI Development Team. License information.