Documentation of 'org.ddogleg.clustering.ComputeClusters' Java class
ComputeClusters
org.ddogleg.clustering

Interface ComputeClusters<D>

  • All Known Implementing Classes:
    ExpectationMaximizationGmm_F64, StandardKMeans_F64


    public interface ComputeClusters<D>
    Given a set of points in N-dimensional space, compute a set of unique assignment for each point to a cluster. The clusters will be designed to minimize some distance function between each cluster and the points assigned to it.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      AssignCluster<D> getAssignment()
      Returns a class which is used to assign a point to a cluster.
      double getDistanceMeasure()
      Returns the sum of all the distances between each point in the set.
      void init(int pointDimension, long randomSeed)
      Must be called first to initializes internal data structures.
      void process(java.util.List<D> points, int numCluster)
      Computes a set of clusters which segment the points into numCluster sets.
      void setVerbose(boolean verbose)
      If set to true then information about status will be printed to standard out.
    • Method Detail

      • init

        void init(int pointDimension,
                  long randomSeed)
        Must be called first to initializes internal data structures. Only needs to be called once.
        Parameters:
        pointDimension - Number of degrees of freedom in each point.
        randomSeed - Seed for any random number generators used internally.
      • process

        void process(java.util.List<D> points,
                     int numCluster)
        Computes a set of clusters which segment the points into numCluster sets.
        Parameters:
        points - Set of points which are to be clustered. Not modified.
        numCluster - Number of clusters it will use to split the points.
      • getAssignment

        AssignCluster<D> getAssignment()

        Returns a class which is used to assign a point to a cluster. Only invoked after process(java.util.List<D>, int) has been called.

        WARNING: The returned data structure is recycled each time compute clusters is called. Create a copy if you wish to avoid having it modified.

        Returns:
        Instance of AssignCluster.
      • getDistanceMeasure

        double getDistanceMeasure()

        Returns the sum of all the distances between each point in the set. Can be used to evaluate the quality of fit for all the clusters. Can only be used to compare when the same number of clusters is uesd.

        NOTE: The specific distance measure is not specified and is application specific.
        Returns:
        sum of distance between each point and their respective clusters.
      • setVerbose

        void setVerbose(boolean verbose)
        If set to true then information about status will be printed to standard out. By default verbose is off
        Parameters:
        verbose - true for versbose mode. False for quite mode.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.