Package elki.clustering.kmeans
Class AnnulusKMeans<V extends elki.data.NumberVector>
- java.lang.Object
-
- elki.clustering.kmeans.AbstractKMeans<V,KMeansModel>
-
- elki.clustering.kmeans.HamerlyKMeans<V>
-
- elki.clustering.kmeans.AnnulusKMeans<V>
-
- Type Parameters:
V- vector datatype
- All Implemented Interfaces:
elki.Algorithm,ClusteringAlgorithm<Clustering<KMeansModel>>,KMeans<V,KMeansModel>
@Reference(authors="J. Drake",title="Faster k-means clustering",booktitle="Faster k-means clustering",url="http://hdl.handle.net/2104/8826",bibkey="mathesis/Drake13") @Reference(authors="G. Hamerly and J. Drake",title="Accelerating Lloyd\u2019s Algorithm for k-Means Clustering",booktitle="Partitional Clustering Algorithms",url="https://doi.org/10.1007/978-3-319-09259-1_2",bibkey="doi:10.1007/978-3-319-09259-1_2") public class AnnulusKMeans<V extends elki.data.NumberVector> extends HamerlyKMeans<V>
Annulus k-means algorithm. A variant of Hamerly with an additional bound, based on comparing the norm of the mean and the norm of the points.This implementation could be further improved by precomputing and storing the norms of all points (at the cost of O(n) memory additionally).
Reference:
J. Drake
Faster k-means clustering
Masters ThesisG. Hamerly and J. Drake
Accelerating Lloyd’s Algorithm for k-Means Clustering
Partitional Clustering Algorithms- Since:
- 0.7.5
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAnnulusKMeans.InstanceInner instance, storing state for a single data set.static classAnnulusKMeans.Par<V extends elki.data.NumberVector>Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private static elki.logging.LoggingLOGThe logger for this class.-
Fields inherited from class elki.clustering.kmeans.HamerlyKMeans
varstat
-
Fields inherited from class elki.clustering.kmeans.AbstractKMeans
distance, initializer, k, maxiter
-
Fields inherited from interface elki.clustering.kmeans.KMeans
DISTANCE_FUNCTION_ID, INIT_ID, K_ID, MAXITER_ID, SEED_ID, VARSTAT_ID
-
-
Constructor Summary
Constructors Constructor Description AnnulusKMeans(elki.distance.NumberVectorDistance<? super V> distance, int k, int maxiter, KMeansInitialization initializer, boolean varstat)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected elki.logging.LogginggetLogger()Get the (STATIC) logger for this class.Clustering<KMeansModel>run(elki.database.relation.Relation<V> relation)Run the clustering algorithm.-
Methods inherited from class elki.clustering.kmeans.AbstractKMeans
getDistance, getInputTypeRestriction, incrementalUpdateMean, initialMeans, means, minusEquals, nearestMeans, plusEquals, plusMinusEquals, setDistance, setInitializer, setK
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.clustering.ClusteringAlgorithm
autorun
-
-
-
-
Constructor Detail
-
AnnulusKMeans
public AnnulusKMeans(elki.distance.NumberVectorDistance<? super V> distance, int k, int maxiter, KMeansInitialization initializer, boolean varstat)
Constructor.- Parameters:
distance- distance functionk- k parametermaxiter- Maxiter parameterinitializer- Initialization methodvarstat- Compute the variance statistic
-
-
Method Detail
-
run
public Clustering<KMeansModel> run(elki.database.relation.Relation<V> relation)
Description copied from interface:KMeansRun the clustering algorithm.- Specified by:
runin interfaceKMeans<V extends elki.data.NumberVector,KMeansModel>- Overrides:
runin classHamerlyKMeans<V extends elki.data.NumberVector>- Parameters:
relation- Relation to process.- Returns:
- Clustering result
-
getLogger
protected elki.logging.Logging getLogger()
Description copied from class:AbstractKMeansGet the (STATIC) logger for this class.- Overrides:
getLoggerin classHamerlyKMeans<V extends elki.data.NumberVector>- Returns:
- the static logger
-
-