Class AbstractCFKMeansInitialization
- java.lang.Object
-
- elki.clustering.kmeans.initialization.betula.AbstractCFKMeansInitialization
-
- Direct Known Subclasses:
CFKPlusPlusLeaves
,CFKPlusPlusTree
,CFRandomlyChosen
,CFWeightedRandomlyChosen
public abstract class AbstractCFKMeansInitialization extends java.lang.Object
Abstract base class for CF k-means initializations. For regular k-means useAbstractKMeansInitialization
instead.- Since:
- 0.8.0
- Author:
- Andreas Lang
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractCFKMeansInitialization.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected RandomFactory
rf
Random number generator
-
Constructor Summary
Constructors Constructor Description AbstractCFKMeansInitialization(RandomFactory rf)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract double[][]
chooseInitialMeans(CFTree<?> tree, java.util.List<? extends ClusterFeature> cfs, int k)
Build the initial models.
-
-
-
Field Detail
-
rf
protected RandomFactory rf
Random number generator
-
-
Constructor Detail
-
AbstractCFKMeansInitialization
public AbstractCFKMeansInitialization(RandomFactory rf)
Constructor.- Parameters:
rf
- Random number generator
-
-
Method Detail
-
chooseInitialMeans
public abstract double[][] chooseInitialMeans(CFTree<?> tree, java.util.List<? extends ClusterFeature> cfs, int k)
Build the initial models.- Parameters:
tree
- CF treecfs
- Cluster features of the tree (may be ignored for tree-based initializations, should be an array list for efficiency)k
- Number of clusters.- Returns:
- initial cluster means
-
-