Package elki.clustering.kmeans
Class BisectingKMeans<V extends elki.data.NumberVector,M extends MeanModel>
- java.lang.Object
-
- elki.clustering.kmeans.BisectingKMeans<V,M>
-
- Type Parameters:
V- Vector typeM- Model type
- All Implemented Interfaces:
elki.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 elki.data.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
-
-
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 elki.logging.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 elki.distance.NumberVectorDistance<? super V>getDistance()Returns the distance.elki.data.type.TypeInformation[]getInputTypeRestriction()Clustering<M>run(elki.database.relation.Relation<V> relation)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 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 elki.data.type.TypeInformation[] getInputTypeRestriction()
- Specified by:
getInputTypeRestrictionin interfaceelki.Algorithm
-
run
public Clustering<M> run(elki.database.relation.Relation<V> relation)
Description copied from interface:KMeansRun the clustering algorithm.
-
getDistance
public elki.distance.NumberVectorDistance<? super V> getDistance()
Description copied from interface:KMeansReturns the distance.- Specified by:
getDistancein interfaceKMeans<V extends elki.data.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(elki.distance.NumberVectorDistance<? super V> distance)
Description copied from interface:KMeansSet the distance function to use.- Specified by:
setDistancein interfaceKMeans<V extends elki.data.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 elki.data.NumberVector,M extends MeanModel>- Parameters:
init- Initialization method
-
-