- java.lang.Object
-
- org.ojalgo.data.cluster.FeatureBasedClusterer
-
- org.ojalgo.data.cluster.KMeansClusterer
-
- All Implemented Interfaces:
ClusteringAlgorithm<Point>
final class KMeansClusterer extends FeatureBasedClusterer
-
-
Field Summary
Fields Modifier and Type Field Description private GeneralisedKMeans<Point>myClustererprivate RandomClustering<Point>myInitialiser
-
Constructor Summary
Constructors Constructor Description KMeansClusterer(int k, DistanceMeasure measure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Set<Point>>cluster(java.util.Collection<Point> input)Partitions the given items into clusters.-
Methods inherited from class org.ojalgo.data.cluster.FeatureBasedClusterer
centroid, cluster, distance, distance, getThreshold, initialiser, isSquared, newAutomatic, newAutomatic, newGreedy, newGreedy, newKMeans, newKMeans, newSpectral, newSpectral, setup
-
-
-
-
Field Detail
-
myClusterer
private final GeneralisedKMeans<Point> myClusterer
-
myInitialiser
private final RandomClustering<Point> myInitialiser
-
-
Constructor Detail
-
KMeansClusterer
KMeansClusterer(int k, DistanceMeasure measure)
-
-
Method Detail
-
cluster
public java.util.List<java.util.Set<Point>> cluster(java.util.Collection<Point> input)
Description copied from interface:ClusteringAlgorithmPartitions the given items into clusters.- Parameters:
input- The items to cluster; must not benull. May be empty.- Returns:
- A list of clusters; each element of the list is a
Set<T>representing one cluster and containing its members. Sets are non-empty and pairwise disjoint; ordering is unspecified.
-
-