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

Class HDBSCAN

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


    public class HDBSCAN
    extends java.lang.Object
    implements Clusterer, Parameterized
    HDBSCAN is a density based clustering algorithm that is an improvement over DBSCAN. Unlike its predecessor, HDBSCAN works with variable density datasets and does not need a search radius to be specified. The original paper presents HDBSCAN with two parameters mpts and mclSize, but recomends that they can be set to the same value and effectively behave as if only one parameter exists. This implementation allows for setting both independtly, but the single parameter constructors will use the same value for both parameters.
    NOTE: The current implementation has O(N2) run time, though this may be improved in the future with more advanced algorithms.

    See: Campello, R. J. G. B., Moulavi, D., & Sander, J. (2013). Density-Based Clustering Based on Hierarchical Density Estimates. In J. Pei, V. Tseng, L. Cao, H. Motoda, & G. Xu (Eds.), Advances in Knowledge Discovery and Data Mining (pp. 160–172). Springer Berlin Heidelberg. doi:10.1007/978-3-642-37456-2_14
    See Also:
    Serialized Form
    • Constructor Detail

      • HDBSCAN

        public HDBSCAN()
        Creates a new HDBSCAN object using a threshold of 15 points to form a cluster.
      • HDBSCAN

        public HDBSCAN(int m_pts)
        Creates a new HDBSCAN using the simplified form, where the only parameter is a single value.
        Parameters:
        m_pts - the minimum number of points needed to form a cluster and the number of neighbors to consider
      • HDBSCAN

        public HDBSCAN(DistanceMetric dm,
                       int m_pts)
        Creates a new HDBSCAN using the simplified form, where the only parameter is a single value.
        Parameters:
        dm - the distance metric to use for finding nearest neighbors
        m_pts - the minimum number of points needed to form a cluster and the number of neighbors to consider
      • HDBSCAN

        public HDBSCAN(DistanceMetric dm,
                       int m_pts,
                       VectorCollection<Vec> vcf)
        Creates a new HDBSCAN using the simplified form, where the only parameter is a single value.
        Parameters:
        dm - the distance metric to use for finding nearest neighbors
        m_pts - the minimum number of points needed to form a cluster and the number of neighbors to consider
        vcf - the vector collection to use for accelerating nearest neighbor queries
      • HDBSCAN

        public HDBSCAN(DistanceMetric dm,
                       int m_pts,
                       int m_clSize,
                       VectorCollection<Vec> vc)
        Creates a new HDBSCAN using the full specification of the algorithm, where two parameters may be altered. In the simplified version both parameters always have the same value.
        Parameters:
        dm - the distance metric to use for finding nearest neighbors
        m_pts - the number of neighbors to consider, acts as a smoothing over the density estimate
        m_clSize - the minimum number of data points needed to form a cluster
        vc - the vector collection to use for accelerating nearest neighbor queries
      • HDBSCAN

        public HDBSCAN(HDBSCAN toCopy)
        Copy constructor
        Parameters:
        toCopy - the object to copy
    • Method Detail

      • setMinClusterSize

        public void setMinClusterSize(int m_clSize)
        Parameters:
        m_clSize - the minimum number of data points needed to form a cluster
      • getMinClusterSize

        public int getMinClusterSize()
        Returns:
        the minimum number of data points needed to form a cluster
      • setDistanceMetrics

        public void setDistanceMetrics(DistanceMetric dm)
        Sets the distance metric to use for determining closeness between data points
        Parameters:
        dm - the distance metric to determine nearest neighbors with
      • getDistanceMetrics

        public DistanceMetric getDistanceMetrics()
        Returns:
        the distance metric to determine nearest neighbors with
      • setMinPoints

        public void setMinPoints(int m_pts)
        Parameters:
        m_pts - the number of neighbors to consider, acts as a smoothing over the density estimate
      • getMinPoints

        public int getMinPoints()
        Returns:
        the number of neighbors to consider, acts as a smoothing over the density estimate
      • clone

        public HDBSCAN clone()
        Specified by:
        clone in interface Clusterer
        Overrides:
        clone in class java.lang.Object
      • 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[]

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.