Package elki.clustering.kmeans
Interface KMeans<V extends elki.data.NumberVector,M extends Model>
-
- Type Parameters:
V- Number vector typeM- Actual model type
- All Superinterfaces:
elki.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,ShallotKMeans,SimplifiedElkanKMeans,SingleAssignmentKMeans,SortMeans,SphericalElkanKMeans,SphericalHamerlyKMeans,SphericalKMeans,SphericalSimplifiedElkanKMeans,SphericalSimplifiedHamerlyKMeans,SphericalSingleAssignmentKMeans,XMeans,YinYangKMeans
public interface KMeans<V extends elki.data.NumberVector,M extends Model> extends ClusteringAlgorithm<Clustering<M>>
Some constants and options shared among kmeans family algorithms.- Since:
- 0.1
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static elki.utilities.optionhandling.OptionIDDISTANCE_FUNCTION_IDOptionID for the distance function.static elki.utilities.optionhandling.OptionIDINIT_IDParameter to specify the initialization methodstatic elki.utilities.optionhandling.OptionIDK_IDParameter to specify the number of clusters to find, must be an integer greater than 0.static elki.utilities.optionhandling.OptionIDMAXITER_IDParameter to specify the number of clusters to find, must be an integer greater or equal to 0, where 0 means no limit.static elki.utilities.optionhandling.OptionIDSEED_IDParameter to specify the random generator seed.static elki.utilities.optionhandling.OptionIDVARSTAT_IDFlag 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 elki.distance.NumberVectorDistance<? super V>getDistance()Returns the distance.Clustering<M>run(elki.database.relation.Relation<V> rel)Run the clustering algorithm.voidsetDistance(elki.distance.NumberVectorDistance<? super V> distance)Set the distance function to use.voidsetInitializer(KMeansInitialization init)Set the initialization method.voidsetK(int k)Set the value of k.-
Methods inherited from interface elki.clustering.ClusteringAlgorithm
autorun
-
-
-
-
Field Detail
-
DISTANCE_FUNCTION_ID
static final elki.utilities.optionhandling.OptionID DISTANCE_FUNCTION_ID
OptionID for the distance function.
-
INIT_ID
static final elki.utilities.optionhandling.OptionID INIT_ID
Parameter to specify the initialization method
-
K_ID
static final elki.utilities.optionhandling.OptionID K_ID
Parameter to specify the number of clusters to find, must be an integer greater than 0.
-
MAXITER_ID
static final elki.utilities.optionhandling.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 elki.utilities.optionhandling.OptionID SEED_ID
Parameter to specify the random generator seed.
-
VARSTAT_ID
static final elki.utilities.optionhandling.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(elki.database.relation.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(elki.distance.NumberVectorDistance<? super V> distance)
Set the distance function to use.- Parameters:
distance- Distance function.
-
getDistance
elki.distance.NumberVectorDistance<? super V> getDistance()
Returns the distance.- Returns:
- the distance
-
setInitializer
void setInitializer(KMeansInitialization init)
Set the initialization method.- Parameters:
init- Initialization method
-
-