Class Partitioning

java.lang.Object
smile.clustering.Partitioning
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DBSCAN, DENCLUE, MEC

public class Partitioning extends Object implements Serializable
Clustering partitions. Partitioning methods classify the data points into distinct non-overlapping groups.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Partitioning(int k, int[] group)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Returns the cluster labels of data points.
    int
    group(int i)
    Returns the cluster label of i-th data point.
    int
    k()
    Returns the number of clusters.
    int[]
    Returns the numbers of data points in each cluster.
    int
    size(int i)
    Returns the number of data points of i-th cluster.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Partitioning

      public Partitioning(int k, int[] group)
      Constructor.
      Parameters:
      k - the number of clusters.
      group - the cluster labels.
  • Method Details

    • k

      public int k()
      Returns the number of clusters.
      Returns:
      the number of clusters.
    • group

      public int[] group()
      Returns the cluster labels of data points.
      Returns:
      the cluster labels of data points.
    • group

      public int group(int i)
      Returns the cluster label of i-th data point.
      Parameters:
      i - the index of data point.
      Returns:
      the cluster label.
    • size

      public int[] size()
      Returns the numbers of data points in each cluster.
      Returns:
      the numbers of data points in each cluster.
    • size

      public int size(int i)
      Returns the number of data points of i-th cluster.
      Parameters:
      i - the index of cluster.
      Returns:
      the number of data points in i-th cluster.
    • toString

      public String toString()
      Overrides:
      toString in class Object