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

Class PAM

    • Method Detail

      • setMaxIterations

        public void setMaxIterations(int iterLimit)
        Parameters:
        iterLimit - the maximum number of iterations of the algorithm to perform
      • getMaxIterations

        public int getMaxIterations()
        Returns:
        the maximum number of iterations of the algorithm to perform
      • setDistanceMetric

        public void setDistanceMetric(DistanceMetric dm)
        Sets the distance metric used by this clustering algorithm
        Parameters:
        dm - the distance metric to use
      • getDistanceMetric

        public DistanceMetric getDistanceMetric()
        Returns:
        the distance metric to be used by this algorithm
      • setStoreMedoids

        public void setStoreMedoids(boolean storeMedoids)
        If set to true the computed medoids will be stored after clustering is completed, and can then be retrieved using getMedoids().
        Parameters:
        storeMedoids - true if the medoids should be stored for later, false to discard them once clustering is complete.
      • getMedoids

        public int[] getMedoids()
        Returns the raw array of indices that indicate which data point acted as the center for each cluster.
        Returns:
        the array of medeoid indices
      • setSeedSelection

        public void setSeedSelection(SeedSelectionMethods.SeedSelection seedSelection)
        Sets the method of seed selection used by this algorithm
        Parameters:
        seedSelection - the method of seed selection to used
      • cluster

        public int[] cluster(DataSet dataSet,
                             boolean parallel,
                             int[] designations)
        Description copied from interface: Clusterer
        Performs clustering on the given data set. Parameters may be estimated by the method, or other heuristics performed.
        Specified by:
        cluster in interface Clusterer
        Parameters:
        dataSet - the data set to perform clustering on
        parallel - true if multiple threads should be used to perform clustering. false if it should be done in a single threaded manner.
        designations - the array which will contain the designated values. The array will be altered and returned by the function. If null is given, a new array will be created and returned.
        Returns:
        the int[]
      • cluster

        public int[] cluster(DataSet dataSet,
                             int clusters,
                             boolean parallel,
                             int[] designations)
        Specified by:
        cluster in interface KClusterer
      • clone

        public PAM clone()
        Specified by:
        clone in interface Clusterer
        Specified by:
        clone in interface KClusterer
        Overrides:
        clone in class java.lang.Object
      • cluster

        public int[] cluster(DataSet dataSet,
                             int lowK,
                             int highK,
                             boolean parallel,
                             int[] designations)
        Specified by:
        cluster in interface KClusterer
      • medoid

        public static int medoid(boolean parallel,
                                 java.util.List<? extends Vec> X,
                                 DistanceMetric dm)
        Computes the medoid of the data
        Parameters:
        parallel - whether or not the computation should be done using multiple cores
        X - the list of all data
        dm - the distance metric to get the medoid with respect to
        Returns:
        the index of the point in X that is the medoid
      • medoid

        public static int medoid(boolean parallel,
                                 java.util.Collection<java.lang.Integer> indecies,
                                 java.util.List<? extends Vec> X,
                                 DistanceMetric dm,
                                 java.util.List<java.lang.Double> accel)
        Computes the medoid of a sub-set of data
        Parameters:
        parallel - whether or not the computation should be done using multiple cores
        indecies - the indexes of the points to get the medoid of
        X - the list of all data
        dm - the distance metric to get the medoid with respect to
        accel - the acceleration cache for the distance metric
        Returns:
        the index value contained within indecies that is the medoid

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.