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

Class TRIKMEDS

  • All Implemented Interfaces:
    java.io.Serializable, Clusterer, KClusterer


    public class TRIKMEDS
    extends PAM
    This class implements the TRIKMEDS algorithm for PAM clustering. It returns the exact same result that would have been computed by PAM, but uses the triangle inequality to avoid unnecessary distance calculations. Expected runtime is O( n sqrt(n)), but still has worst case complexity O(n2). It also requires that the distance metric used be a valid distance metric.
    See Also:
    Serialized Form
    • Method Detail

      • setDistanceMetric

        public void setDistanceMetric(DistanceMetric dm)
        Description copied from class: PAM
        Sets the distance metric used by this clustering algorithm
        Overrides:
        setDistanceMetric in class PAM
        Parameters:
        dm - the distance metric to use
      • 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.