|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.ml.clustering.Clusterer<T>
org.apache.commons.math3.ml.clustering.MultiKMeansPlusPlusClusterer<T>
T
- type of the points to clusterpublic class MultiKMeansPlusPlusClusterer<T extends Clusterable>
A wrapper around a k-means++ clustering algorithm which performs multiple trials and returns the best solution.
Constructor Summary | |
---|---|
MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer,
int numTrials)
Build a clusterer. |
Method Summary | |
---|---|
List<CentroidCluster<T>> |
cluster(Collection<T> points)
Runs the K-means++ clustering algorithm. |
KMeansPlusPlusClusterer<T> |
getClusterer()
Returns the embedded k-means clusterer used by this instance. |
int |
getNumTrials()
Returns the number of trials this instance will do. |
Methods inherited from class org.apache.commons.math3.ml.clustering.Clusterer |
---|
distance, getDistanceMeasure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer, int numTrials)
clusterer
- the k-means clusterer to usenumTrials
- number of trial runsMethod Detail |
---|
public KMeansPlusPlusClusterer<T> getClusterer()
public int getNumTrials()
public List<CentroidCluster<T>> cluster(Collection<T> points) throws MathIllegalArgumentException, ConvergenceException
cluster
in class Clusterer<T extends Clusterable>
points
- the points to cluster
MathIllegalArgumentException
- if the data points are null or the number
of clusters is larger than the number of data points
ConvergenceException
- if an empty cluster is encountered and the
underlying KMeansPlusPlusClusterer
has its
KMeansPlusPlusClusterer.EmptyClusterStrategy
is set to ERROR
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |