Documentation of 'jsat.clustering.ClustererBase' Java class
ClustererBase
jsat.clustering

Class ClustererBase

    • Constructor Detail

      • ClustererBase

        public ClustererBase()
    • Method Detail

      • createClusterListFromAssignmentArray

        public static java.util.List<java.util.List<DataPoint>> createClusterListFromAssignmentArray(int[] assignments,
                                                                                                     DataSet dataSet)
        Convenient helper method. A list of lists to represent a cluster may be desirable. In such a case, this method will take in an array of cluster assignments, and return a list of lists.
        Parameters:
        assignments - the array containing cluster assignments
        dataSet - the original data set, with data in the same order as was used to create the assignments array
        Returns:
        a List of lists where each list contains the data points for one cluster, and the lists are in order by cluster id.
      • getDatapointsFromCluster

        public static java.util.List<DataPoint> getDatapointsFromCluster(int c,
                                                                         int[] assignments,
                                                                         DataSet dataSet,
                                                                         int[] indexFrom)
        Gets a list of the datapoints in a data set that belong to the indicated cluster
        Parameters:
        c - the cluster ID to get the datapoints for
        assignments - the array containing cluster assignments
        dataSet - the data set to get the points from
        indexFrom - stores the index from the original dataset that the datapoint is from, such that the item at index i in the returned list can be found in the original dataset at index indexFrom[i]. May be null
        Returns:
        a list of datapoints that were assignment to the designated cluster
      • clone

        public abstract Clusterer clone()
        Specified by:
        clone in interface Clusterer
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.