Package elki.clustering.kmeans
Class BisectingKMeans<V extends NumberVector,M extends MeanModel>
- java.lang.Object
-
- elki.clustering.kmeans.BisectingKMeans<V,M>
-
- Type Parameters:
V- Vector typeM- Model type
- All Implemented Interfaces:
Algorithm,ClusteringAlgorithm<Clustering<M>>,KMeans<V,M>
@Reference(authors="M. Steinbach, G. Karypis, V. Kumar", title="A Comparison of Document Clustering Techniques", booktitle="KDD workshop on text mining. Vol. 400. No. 1", url="http://glaros.dtc.umn.edu/gkhome/fetch/papers/docclusterKDDTMW00.pdf", bibkey="conf/kdd/SteinbachKK00") public class BisectingKMeans<V extends NumberVector,M extends MeanModel> extends java.lang.Object implements KMeans<V,M>
The bisecting k-means algorithm works by starting with an initial partitioning into two clusters, then repeated splitting of the largest cluster to get additional clusters.Reference:
M. Steinbach, G. Karypis, V. Kumar
A Comparison of Document Clustering Techniques
KDD workshop on text mining. Vol. 400. No. 1- Since:
- 0.6.0
- Author:
- Stephan Baier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description private KMeans<V,M>innerkMeansVariant of kMeans for the bisecting step.private intkDesired value of k.private static LoggingLOGThe logger for this class.-
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 BisectingKMeans(int k, KMeans<V,M> innerkMeans)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumberVectorDistance<? super V>getDistance()Returns the distance.TypeInformation[]getInputTypeRestriction()Get the input type restriction used for negotiating the data query.Clustering<M>run(Relation<V> relation)Run the clustering algorithm.voidsetDistance(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.clustering.ClusteringAlgorithm
autorun
-
-
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:AlgorithmGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin interfaceAlgorithm- Returns:
- Type restriction
-
run
public Clustering<M> run(Relation<V> relation)
Description copied from interface:KMeansRun the clustering algorithm.
-
getDistance
public NumberVectorDistance<? super V> getDistance()
Description copied from interface:KMeansReturns the distance.- Specified by:
getDistancein interfaceKMeans<V extends NumberVector,M extends MeanModel>- Returns:
- the distance
-
setK
public void setK(int k)
Description copied from interface:KMeansSet the value of k. Needed for some types of nested k-means.
-
setDistance
public void setDistance(NumberVectorDistance<? super V> distance)
Description copied from interface:KMeansSet the distance function to use.- Specified by:
setDistancein interfaceKMeans<V extends NumberVector,M extends MeanModel>- Parameters:
distance- Distance function.
-
setInitializer
public void setInitializer(KMeansInitialization init)
Description copied from interface:KMeansSet the initialization method.- Specified by:
setInitializerin interfaceKMeans<V extends NumberVector,M extends MeanModel>- Parameters:
init- Initialization method
-
-