V
- Vector typepublic class RandomlyChosenInitialMeans<V> extends AbstractKMeansInitialization<V> implements KMedoidsInitialization<V>
Modifier and Type | Class and Description |
---|---|
static class |
RandomlyChosenInitialMeans.Parameterizer<V>
Parameterization class.
|
rnd
Constructor and Description |
---|
RandomlyChosenInitialMeans(RandomFactory rnd)
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 RandomlyChosenInitialMeans(RandomFactory rnd)
rnd
- Random generator.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