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.
|
static OptionID |
VARSTAT_ID
Flag to compute the final clustering variance statistic (for methods that
employ bounds to avoid computing all distances).
|
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 |
setInitializer(KMeansInitialization init)
Set the initialization method.
|
void |
setK(int k)
Set the value of k.
|
rungetDistanceFunctiongetInputTypeRestrictionstatic final OptionID INIT_ID
static final OptionID K_ID
static final OptionID MAXITER_ID
static final OptionID SEED_ID
static final OptionID VARSTAT_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.void setInitializer(KMeansInitialization init)
init - Initialization methodCopyright © 2019 ELKI Development Team. License information.