T
- type of the points to clusterpublic class MultiKMeansPlusPlusClusterer<T extends Clusterable> extends Clusterer<T>
Constructor and Description |
---|
MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer,
int numTrials)
Build a clusterer.
|
MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer,
int numTrials,
ClusterEvaluator<T> evaluator)
Build a clusterer.
|
Modifier and Type | Method and Description |
---|---|
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.
|
ClusterEvaluator<T> |
getClusterEvaluator()
Returns the
ClusterEvaluator used to determine the "best" clustering. |
int |
getNumTrials()
Returns the number of trials this instance will do.
|
distance, getDistanceMeasure
public MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer, int numTrials)
clusterer
- the k-means clusterer to usenumTrials
- number of trial runspublic MultiKMeansPlusPlusClusterer(KMeansPlusPlusClusterer<T> clusterer, int numTrials, ClusterEvaluator<T> evaluator)
clusterer
- the k-means clusterer to usenumTrials
- number of trial runsevaluator
- the cluster evaluator to usepublic KMeansPlusPlusClusterer<T> getClusterer()
public int getNumTrials()
public ClusterEvaluator<T> getClusterEvaluator()
ClusterEvaluator
used to determine the "best" clustering.ClusterEvaluator
public List<CentroidCluster<T>> cluster(Collection<T> points) throws MathIllegalArgumentException, MathIllegalStateException
cluster
in class Clusterer<T extends Clusterable>
points
- the points to clusterMathIllegalArgumentException
- if the data points are null or the number
of clusters is larger than the number of data pointsMathIllegalStateException
- if an empty cluster is encountered and the
underlying KMeansPlusPlusClusterer
has its
KMeansPlusPlusClusterer.EmptyClusterStrategy
is set to ERROR
.Copyright © 2016–2019 Hipparchus.org. All rights reserved.