|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer<T>
T - type of the points to clusterpublic class KMeansPlusPlusClusterer<T extends Clusterable<T>>
Clustering algorithm based on David Arthur and Sergei Vassilvitski k-means++ algorithm.
| Nested Class Summary | |
|---|---|
static class |
KMeansPlusPlusClusterer.EmptyClusterStrategy
Strategies to use for replacing an empty cluster. |
| Constructor Summary | |
|---|---|
KMeansPlusPlusClusterer(Random random)
Build a clusterer. |
|
KMeansPlusPlusClusterer(Random random,
KMeansPlusPlusClusterer.EmptyClusterStrategy emptyStrategy)
Build a clusterer. |
|
| Method Summary | |
|---|---|
List<Cluster<T>> |
cluster(Collection<T> points,
int k,
int maxIterations)
Runs the K-means++ clustering algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KMeansPlusPlusClusterer(Random random)
The default strategy for handling empty clusters that may appear during algorithm iterations is to split the cluster with largest distance variance.
random - random generator to use for choosing initial centers
public KMeansPlusPlusClusterer(Random random,
KMeansPlusPlusClusterer.EmptyClusterStrategy emptyStrategy)
random - random generator to use for choosing initial centersemptyStrategy - strategy to use for handling empty clusters that
may appear during algorithm iterations| Method Detail |
|---|
public List<Cluster<T>> cluster(Collection<T> points,
int k,
int maxIterations)
points - the points to clusterk - the number of clusters to split the data intomaxIterations - the maximum number of iterations to run the algorithm
for. If negative, no maximum will be used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||