Class KMeansPlusPlusClustering
java.lang.Object
org.moeaframework.util.clustering.KMeansPlusPlusClustering
- All Implemented Interfaces:
Clustering
A wrapper for the Apache Commons Math K-means++ algorithm. The "++" term specifies a procedure for initializing
the cluster centers before performing the k-means algorithm, which avoids theoretical shortcomings of the k-means
algorithm that result in suboptimal clustering.
References:
- https://en.wikipedia.org/wiki/K-means%2B%2B
- https://en.wikipedia.org/wiki/K-means_clustering
-
Constructor Summary
ConstructorDescriptionKMeansPlusPlusClustering
(DistanceMeasure.ApacheDistanceMeasure<ClusterableSolution> distanceMeasure) Constructs a new K-means++ clustering method. -
Method Summary
Modifier and TypeMethodDescriptioncluster
(int size, Iterable<ClusterableSolution> solutions) Construct clusters using the points defined by the clusterable solutions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.util.clustering.Clustering
cluster, clusterObjectives, clusterObjectives, clusterVariables, clusterVariables, truncate
-
Constructor Details
-
KMeansPlusPlusClustering
public KMeansPlusPlusClustering(DistanceMeasure.ApacheDistanceMeasure<ClusterableSolution> distanceMeasure) Constructs a new K-means++ clustering method.- Parameters:
distanceMeasure
- the distance measure used to construct the cluster
-
-
Method Details
-
cluster
Description copied from interface:Clustering
Construct clusters using the points defined by the clusterable solutions.- Specified by:
cluster
in interfaceClustering
- Parameters:
size
- the number of clusters to constructsolutions
- the clusterable solutions- Returns:
- the clusters
-