V
- Vector typepublic class FirstKInitialMeans<V> extends Object implements KMeansInitialization<V>, KMedoidsInitialization<V>
Modifier and Type | Class and Description |
---|---|
static class |
FirstKInitialMeans.Parameterizer<V extends NumberVector<?>>
Parameterization class.
|
Constructor and Description |
---|
FirstKInitialMeans()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<V> |
chooseInitialMeans(Database database,
Relation<V> relation,
int k,
PrimitiveDistanceFunction<? super NumberVector<?>,?> distanceFunction)
Choose initial means
|
DBIDs |
chooseInitialMedoids(int k,
DistanceQuery<? super V,?> distanceFunction)
Choose initial means
|
public List<V> chooseInitialMeans(Database database, Relation<V> relation, int k, PrimitiveDistanceFunction<? super NumberVector<?>,?> distanceFunction)
KMeansInitialization
chooseInitialMeans
in interface KMeansInitialization<V>
database
- Database contextrelation
- Relationk
- Parameter kdistanceFunction
- Distance functionpublic DBIDs chooseInitialMedoids(int k, DistanceQuery<? super V,?> distanceFunction)
KMedoidsInitialization
chooseInitialMedoids
in interface KMedoidsInitialization<V>
k
- Parameter kdistanceFunction
- Distance function