V
- Number vector typeM
- Actual model typepublic interface KMeans<V extends NumberVector,M extends Model> extends ClusteringAlgorithm<Clustering<M>>, DistanceBasedAlgorithm<V>
Modifier and Type | Field and Description |
---|---|
static OptionID |
INIT_ID
Parameter to specify the initialization method
|
static OptionID |
K_ID
Parameter to specify the number of clusters to find, must be an integer
greater than 0.
|
static OptionID |
MAXITER_ID
Parameter to specify the number of clusters to find, must be an integer
greater or equal to 0, where 0 means no limit.
|
static OptionID |
SEED_ID
Parameter to specify the random generator seed.
|
DISTANCE_FUNCTION_ID
Modifier and Type | Method and Description |
---|---|
Clustering<M> |
run(Database database,
Relation<V> rel)
Run the clustering algorithm.
|
void |
setDistanceFunction(NumberVectorDistanceFunction<? super V> distanceFunction)
Set the distance function to use.
|
void |
setK(int k)
Set the value of k.
|
run
getDistanceFunction
getInputTypeRestriction
static final OptionID INIT_ID
static final OptionID K_ID
static final OptionID MAXITER_ID
static final OptionID SEED_ID
Clustering<M> run(Database database, Relation<V> rel)
database
- Database to run on.rel
- Relation to process.void setK(int k)
k
- K parametervoid setDistanceFunction(NumberVectorDistanceFunction<? super V> distanceFunction)
distanceFunction
- Distance function.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.