Package elki.clustering.kmeans
Interface KMeans<V extends NumberVector,M extends Model>
-
- Type Parameters:
V
- Number vector typeM
- Actual model type
- All Superinterfaces:
Algorithm
,ClusteringAlgorithm<Clustering<M>>
- All Known Implementing Classes:
AbstractKMeans
,AnnulusKMeans
,BestOfMultipleKMeans
,BetulaLloydKMeans
,BisectingKMeans
,CompareMeans
,ElkanKMeans
,EuclideanSphericalElkanKMeans
,EuclideanSphericalHamerlyKMeans
,EuclideanSphericalSimplifiedElkanKMeans
,ExponionKMeans
,GMeans
,HamerlyKMeans
,HartiganWongKMeans
,KDTreeFilteringKMeans
,KDTreePruningKMeans
,KMeansMinusMinus
,KMediansLloyd
,LloydKMeans
,MacQueenKMeans
,ParallelLloydKMeans
,SameSizeKMeans
,ShallotKMeans
,SimplifiedElkanKMeans
,SingleAssignmentKMeans
,SortMeans
,SphericalElkanKMeans
,SphericalHamerlyKMeans
,SphericalKMeans
,SphericalSimplifiedElkanKMeans
,SphericalSimplifiedHamerlyKMeans
,SphericalSingleAssignmentKMeans
,XMeans
,YinYangKMeans
public interface KMeans<V extends NumberVector,M extends Model> extends ClusteringAlgorithm<Clustering<M>>
Some constants and options shared among kmeans family algorithms.- Since:
- 0.1
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description static OptionID
DISTANCE_FUNCTION_ID
OptionID for the distance function.static OptionID
INIT_ID
Parameter to specify the initialization methodstatic 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).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NumberVectorDistance<? super V>
getDistance()
Returns the distance.Clustering<M>
run(Relation<V> rel)
Run the clustering algorithm.void
setDistance(NumberVectorDistance<? super V> distance)
Set the distance function to use.void
setInitializer(KMeansInitialization init)
Set the initialization method.void
setK(int k)
Set the value of k.-
Methods inherited from interface elki.Algorithm
getInputTypeRestriction
-
Methods inherited from interface elki.clustering.ClusteringAlgorithm
autorun
-
-
-
-
Field Detail
-
DISTANCE_FUNCTION_ID
static final OptionID DISTANCE_FUNCTION_ID
OptionID for the distance function.
-
INIT_ID
static final OptionID INIT_ID
Parameter to specify the initialization method
-
K_ID
static final OptionID K_ID
Parameter to specify the number of clusters to find, must be an integer greater than 0.
-
MAXITER_ID
static final 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.
-
SEED_ID
static final OptionID SEED_ID
Parameter to specify the random generator seed.
-
VARSTAT_ID
static final OptionID VARSTAT_ID
Flag to compute the final clustering variance statistic (for methods that employ bounds to avoid computing all distances).
-
-
Method Detail
-
run
Clustering<M> run(Relation<V> rel)
Run the clustering algorithm.- Parameters:
rel
- Relation to process.- Returns:
- Clustering result
-
setK
void setK(int k)
Set the value of k. Needed for some types of nested k-means.- Parameters:
k
- K parameter
-
setDistance
void setDistance(NumberVectorDistance<? super V> distance)
Set the distance function to use.- Parameters:
distance
- Distance function.
-
getDistance
NumberVectorDistance<? super V> getDistance()
Returns the distance.- Returns:
- the distance
-
setInitializer
void setInitializer(KMeansInitialization init)
Set the initialization method.- Parameters:
init
- Initialization method
-
-