V
- vector type to use@Title(value="k-Means (MacQueen Algorithm)") @Reference(authors="J. MacQueen", title="Some Methods for Classification and Analysis of Multivariate Observations", booktitle="5th Berkeley Symp. Math. Statist. Prob.", url="http://projecteuclid.org/euclid.bsmsp/1200512992", bibkey="conf/bsmsp/MacQueen67") public class KMeansMacQueen<V extends NumberVector> extends AbstractKMeans<V,KMeansModel>
This implementation will by default iterate over the data set until convergence, although MacQueen likely only meant to do a single pass over the data, but the result quality improves with multiple passes.
Reference:
J. MacQueen
Some Methods for Classification and Analysis of Multivariate Observations
5th Berkeley Symp. Math. Statist. Prob.
Modifier and Type | Class and Description |
---|---|
protected static class |
KMeansMacQueen.Instance
Inner instance, storing state for a single data set.
|
static class |
KMeansMacQueen.Parameterizer<V extends NumberVector>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
The logger for this class.
|
initializer, k, maxiter
distanceFunction
ALGORITHM_ID
INIT_ID, K_ID, MAXITER_ID, SEED_ID, VARSTAT_ID
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
KMeansMacQueen(NumberVectorDistanceFunction<? super V> distanceFunction,
int k,
int maxiter,
KMeansInitialization initializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
Clustering<KMeansModel> |
run(Database database,
Relation<V> relation)
Run the clustering algorithm.
|
getInputTypeRestriction, incrementalUpdateMean, initialMeans, means, minusEquals, nearestMeans, plusEquals, plusMinusEquals, setDistanceFunction, setInitializer, setK
getDistanceFunction
run
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run
getDistanceFunction
private static final Logging LOG
public KMeansMacQueen(NumberVectorDistanceFunction<? super V> distanceFunction, int k, int maxiter, KMeansInitialization initializer)
distanceFunction
- distance functionk
- k parametermaxiter
- Maxiter parameterinitializer
- Initialization methodpublic Clustering<KMeansModel> run(Database database, Relation<V> relation)
KMeans
database
- Database to run on.relation
- Relation to process.protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<Clustering<KMeansModel>>
Copyright © 2019 ELKI Development Team. License information.