Package elki.clustering.kmeans
Class HartiganWongKMeans<V extends NumberVector>
- java.lang.Object
-
- elki.clustering.kmeans.AbstractKMeans<V,KMeansModel>
-
- elki.clustering.kmeans.HartiganWongKMeans<V>
-
- Type Parameters:
V
- Number vector type
- All Implemented Interfaces:
Algorithm
,ClusteringAlgorithm<Clustering<KMeansModel>>
,KMeans<V,KMeansModel>
@Reference(authors="J. A. Hartigan, M. A. Wong", title="Algorithm AS 136: A K-Means Clustering Algorithm", booktitle="J. Royal Statistical Society. Series C (Applied Statistics) 28(1)", url="https://doi.org/10.2307/2346830", bibkey="doi:10.2307/2346830") public class HartiganWongKMeans<V extends NumberVector> extends AbstractKMeans<V,KMeansModel>
Hartigan and Wong k-means clustering. This implementation is derived from the Fortran code included in the referenced publication, but not a literal port.Reference:
J. A. Hartigan, M. A. Wong
Algorithm AS 136: A K-Means Clustering Algorithm
J. Royal Statistical Society. Series C (Applied Statistics) 28(1)- Since:
- 0.8.0
- Author:
- Minh Nhat Nguyen, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
HartiganWongKMeans.Instance
Instance for a particular data set.static class
HartiganWongKMeans.Parameterizer<V extends NumberVector>
Parameterization class.-
Nested classes/interfaces inherited from class elki.clustering.kmeans.AbstractKMeans
AbstractKMeans.Par<V extends NumberVector>
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
Class logger-
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 HartiganWongKMeans(int k, KMeansInitialization initializer)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Logging
getLogger()
Get the (STATIC) logger for this class.Clustering<KMeansModel>
run(Relation<V> rel)
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
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger
-
-
Constructor Detail
-
HartiganWongKMeans
public HartiganWongKMeans(int k, KMeansInitialization initializer)
Constructor.- Parameters:
k
- Number of clustersinitializer
- Initialization method
-
-
Method Detail
-
run
public Clustering<KMeansModel> run(Relation<V> rel)
Description copied from interface:KMeans
Run the clustering algorithm.- Parameters:
rel
- Relation to process.- Returns:
- Clustering result
-
getLogger
protected Logging getLogger()
Description copied from class:AbstractKMeans
Get the (STATIC) logger for this class.- Specified by:
getLogger
in classAbstractKMeans<V extends NumberVector,KMeansModel>
- Returns:
- the static logger
-
-