Class RandomClustering<T>
java.lang.Object
org.ojalgo.data.cluster.RandomClustering<T>
- All Implemented Interfaces:
ClusteringAlgorithm<T>
Randomly assigns each item to one of k clusters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
RANDOM
-
myK
private final int myK
-
-
Constructor Details
-
RandomClustering
RandomClustering(int k)
-
-
Method Details
-
cluster
Description copied from interface:ClusteringAlgorithmPartitions the given items into clusters.- Specified by:
clusterin interfaceClusteringAlgorithm<T>- 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.
-
centroids
-