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

Class OPTICS

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


    public class OPTICS
    extends ClustererBase
    implements Parameterized
    An Implementation of the OPTICS algorithm, which is a generalization of DBSCAN. OPTICS creates an ordering of the ports, and then clusters can be extracted from this ordering in numerous different ways.
    NOTE: The original clustering method proposed in the paper is fairly complicated, and its implementation is not yet complete. Though it does perform some amount of clustering, it may not return the expected results.

    See original paper
    Ankerst, M., Breunig, M., Kriegel, H.-P.,&Sander, J. (1999). OPTICS: ordering points to identify the clustering structure. Proceedings of the 1999 ACM SIGMOD international conference on Management of data (Vol. 28, pp. 49–60). Philadelphia, Pennsylvania: ACM.
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_XI

        public static final double DEFAULT_XI
        The default value for xi is 0.005
        See Also:
        Constant Field Values
      • DEFAULT_MIN_POINTS

        public static final int DEFAULT_MIN_POINTS
        The default number of points to consider is 10.
        See Also:
        Constant Field Values
      • DEFAULT_EXTRACTION_METHOD

        public static final OPTICS.ExtractionMethod DEFAULT_EXTRACTION_METHOD
        The default method used to extract clusters in OPTICS
    • Constructor Detail

      • OPTICS

        public OPTICS()
        Creates a new OPTICS cluster object. Because the radius of OPTICS is not sensitive, it is estimated from the data and set to a sufficiently large value. The EuclideanDistance will be used as the metric.
      • OPTICS

        public OPTICS(int minPts)
        Creates a new OPTICS cluster object. Because the radius of OPTICS is not sensitive, it is estimated from the data and set to a sufficiently large value. The EuclideanDistance will be used as the metric.
        Parameters:
        minPts - the minimum number of points for reachability
      • OPTICS

        public OPTICS(DistanceMetric dm,
                      int minPts)
        Creates a new OPTICS cluster object. Because the radius of OPTICS is not sensitive, it is estimated from the data and set to a sufficiently large value.
        Parameters:
        dm - the distance metric to use
        minPts - the minimum number of points for reachability
      • OPTICS

        public OPTICS(DistanceMetric dm,
                      int minPts,
                      double xi)
        Creates a new OPTICS cluster object. Because the radius of OPTICS is not sensitive, it is estimated from the data and set to a sufficiently large value.
        Parameters:
        dm - the distance metric to use
        minPts - the minimum number of points for reachability
        xi - the xi value
      • OPTICS

        public OPTICS(OPTICS toCopy)
    • Method Detail

      • setDistanceMetric

        public void setDistanceMetric(DistanceMetric dm)
        Sets the distance metric used to compute distances in the algorithm.
        Parameters:
        dm - the distance metric to use
      • getDistanceMetric

        public DistanceMetric getDistanceMetric()
        Returns the distance metric used to compute distances in the algorithm.
        Returns:
        the distance metric used
      • setXi

        public void setXi(double xi)
        Sets the xi value used in OPTICS.ExtractionMethod.XI_STEEP_ORIGINAL to produce cluster results.
        Parameters:
        xi - the value in the range (0, 1)
        Throws:
        java.lang.ArithmeticException - if the value is not in the appropriate range
      • setExtractionMethod

        public void setExtractionMethod(OPTICS.ExtractionMethod extractionMethod)
        Sets the method used to extract clusters from the reachability plot.
        Parameters:
        extractionMethod - the clustering method
      • getExtractionMethod

        public OPTICS.ExtractionMethod getExtractionMethod()
        Returns the method used to extract clusters from the reachability plot.
        Returns:
        the clustering method used
      • setMinPts

        public void setMinPts(int minPts)
        Sets the minimum number of points needed to compute the core distance. Higher values tend to smooth out the reachability plot.
        Parameters:
        minPts - the number of points to compute reachability and core distance
      • getMinPts

        public int getMinPts()
        Sets the minimum number of points needed to compute the core distance.
        Returns:
        the number of points to compute reachability and core distance
      • setVCF

        public void setVCF(VectorCollection<VecPaired<Vec,java.lang.Integer>> vc)
        Sets the VectorCollection used to produce acceleration structures for the OPTICS computation.
        Parameters:
        vc - the vector collection to use
      • cluster

        public int[] cluster(DataSet dataSet,
                             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
        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:
        an array indicating for each value indicating the cluster designation. This is the same array as designations, or a new one if the input array was null
      • 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[]
      • getReachabilityArray

        public double[] getReachabilityArray()
        Returns a copy of the reachability array in correct reachability order. Some values that are not density reachability could have a value of Double.POSITIVE_INFINITY.
        Returns:
        an array of the reachability values

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.