Class SpectralClusterer

java.lang.Object
org.ojalgo.data.cluster.FeatureBasedClusterer
org.ojalgo.data.cluster.SpectralClusterer
All Implemented Interfaces:
ClusteringAlgorithm<Point>

final class SpectralClusterer extends FeatureBasedClusterer
Spectral clustering for Points using a fully connected RBF similarity graph and the symmetric normalised Laplacian. Pairwise distances are computed with the configured DistanceMeasure; the kernel scale is set from the median distance. The algorithm computes the k eigenvectors corresponding to the smallest eigenvalues of L = I - D^{-1/2} W D^{-1/2}, row-normalises the embedding, runs k-means, and maps clusters back to the original points. For n == 0 it returns empty; for n invalid input: '<'= k it returns singletons. Requires point ids contiguous in [0,n). Complexity dominated by O(n^2) pairwise work and an eigen-decomposition of the n×n Laplacian.
  • Field Details

  • Constructor Details

  • Method Details

    • cluster

      public List<Set<Point>> cluster(Collection<Point> input)
      Description copied from interface: ClusteringAlgorithm
      Partitions the given items into clusters.
      Parameters:
      input - The items to cluster; must not be null. 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.