hdbscan


Namehdbscan JSON
Version 0.8.40 PyPI version JSON
download
home_pagehttp://github.com/scikit-learn-contrib/hdbscan
SummaryClustering based on density with variable density clusters
upload_time2024-11-18 16:14:05
maintainerLeland McInnes
docs_urlNone
authorNone
requires_pythonNone
licenseBSD
keywords cluster clustering density hierarchical
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/hdbscan.svg
    :target: https://pypi.python.org/pypi/hdbscan/
    :alt: PyPI Version
.. image:: https://anaconda.org/conda-forge/hdbscan/badges/version.svg
    :target: https://anaconda.org/conda-forge/hdbscan
    :alt: Conda-forge Version
.. image:: https://anaconda.org/conda-forge/hdbscan/badges/downloads.svg
    :target: https://anaconda.org/conda-forge/hdbscan
    :alt: Conda-forge downloads
.. image:: https://img.shields.io/pypi/l/hdbscan.svg
    :target: https://github.com/scikit-learn-contrib/hdbscan/blob/master/LICENSE
    :alt: License
.. image:: https://travis-ci.org/scikit-learn-contrib/hdbscan.svg
    :target: https://travis-ci.org/scikit-learn-contrib/hdbscan
    :alt: Travis Build Status
.. image:: https://codecov.io/gh/scikit-learn-contrib/hdbscan/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/scikit-learn-contrib/hdbscan
    :alt: Test Coverage
.. image:: https://readthedocs.org/projects/hdbscan/badge/?version=latest
    :target: https://hdbscan.readthedocs.org
    :alt: Docs
.. image:: http://joss.theoj.org/papers/10.21105/joss.00205/status.svg
    :target: http://joss.theoj.org/papers/10.21105/joss.00205
    :alt: JOSS article
.. image:: https://mybinder.org/badge.svg 
    :target: https://mybinder.org/v2/gh/scikit-learn-contrib/hdbscan
    :alt: Launch example notebooks in Binder


=======
HDBSCAN
=======

HDBSCAN - Hierarchical Density-Based Spatial Clustering of Applications
with Noise. Performs DBSCAN over varying epsilon values and integrates 
the result to find a clustering that gives the best stability over epsilon.
This allows HDBSCAN to find clusters of varying densities (unlike DBSCAN),
and be more robust to parameter selection.

In practice this means that HDBSCAN returns a good clustering straight
away with little or no parameter tuning -- and the primary parameter,
minimum cluster size, is intuitive and easy to select.

HDBSCAN is ideal for exploratory data analysis; it's a fast and robust
algorithm that you can trust to return meaningful clusters (if there
are any).

Based on the papers:

    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* 
    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.
    2017 `[pdf] <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8215642>`_

    R. Campello, D. Moulavi, and J. Sander, *Density-Based Clustering Based on
    Hierarchical Density Estimates*
    In: Advances in Knowledge Discovery and Data Mining, Springer, pp 160-172.
    2013
    
Documentation, including tutorials, are available on ReadTheDocs at http://hdbscan.readthedocs.io/en/latest/ .  
    
Notebooks `comparing HDBSCAN to other clustering algorithms <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb>`_, explaining `how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ and `comparing performance with other python clustering implementations <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ are available.

------------------
How to use HDBSCAN
------------------

The hdbscan package inherits from sklearn classes, and thus drops in neatly
next to other sklearn clusterers with an identical calling API. Similarly it
supports input in a variety of formats: an array (or pandas dataframe, or
sparse matrix) of shape ``(num_samples x num_features)``; an array (or sparse matrix)
giving a distance matrix between samples.

.. code:: python

    import hdbscan
    from sklearn.datasets import make_blobs
    
    data, _ = make_blobs(1000)
    
    clusterer = hdbscan.HDBSCAN(min_cluster_size=10)
    cluster_labels = clusterer.fit_predict(data)

-----------
Performance
-----------

Significant effort has been put into making the hdbscan implementation as fast as 
possible. It is `orders of magnitude faster than the reference implementation <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Python%20vs%20Java.ipynb>`_ in Java,
and is currently faster than highly optimized single linkage implementations in C and C++.
`version 0.7 performance can be seen in this notebook <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ .
In particular `performance on low dimensional data is better than sklearn's DBSCAN <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations%202D%20v0.7.ipynb>`_ ,
and via support for caching with joblib, re-clustering with different parameters
can be almost free.

------------------------
Additional functionality
------------------------

The hdbscan package comes equipped with visualization tools to help you
understand your clustering results. After fitting data the clusterer
object has attributes for:

* The condensed cluster hierarchy
* The robust single linkage cluster hierarchy
* The reachability distance minimal spanning tree

All of which come equipped with methods for plotting and converting
to Pandas or NetworkX for further analysis. See the notebook on
`how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ for examples and further details.

The clusterer objects also have an attribute providing cluster membership
strengths, resulting in optional soft clustering (and no further compute 
expense). Finally each cluster also receives a persistence score giving
the stability of the cluster over the range of distance scales present
in the data. This provides a measure of the relative strength of clusters.

-----------------
Outlier Detection
-----------------

The HDBSCAN clusterer objects also support the GLOSH outlier detection algorithm. 
After fitting the clusterer to data the outlier scores can be accessed via the
``outlier_scores_`` attribute. The result is a vector of score values, one for
each data point that was fit. Higher scores represent more outlier like objects.
Selecting outliers via upper quantiles is often a good approach.

Based on the paper:
    R.J.G.B. Campello, D. Moulavi, A. Zimek and J. Sander 
    *Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection*, 
    ACM Trans. on Knowledge Discovery from Data, Vol 10, 1 (July 2015), 1-51.

---------------------
Robust single linkage
---------------------

The hdbscan package also provides support for the *robust single linkage*
clustering algorithm of Chaudhuri and Dasgupta. As with the HDBSCAN 
implementation this is a high performance version of the algorithm 
outperforming scipy's standard single linkage implementation. The
robust single linkage hierarchy is available as an attribute of
the robust single linkage clusterer, again with the ability to plot
or export the hierarchy, and to extract flat clusterings at a given
cut level and gamma value.

Example usage:

.. code:: python

    import hdbscan
    from sklearn.datasets import make_blobs
    
    data, _ = make_blobs(1000)
    
    clusterer = hdbscan.RobustSingleLinkage(cut=0.125, k=7)
    cluster_labels = clusterer.fit_predict(data)
    hierarchy = clusterer.cluster_hierarchy_
    alt_labels = hierarchy.get_clusters(0.100, 5)
    hierarchy.plot()


Based on the paper:
    K. Chaudhuri and S. Dasgupta.
    *"Rates of convergence for the cluster tree."*
    In Advances in Neural Information Processing Systems, 2010.

----------------
Branch detection
----------------

The hdbscan package supports a branch-detection post-processing step 
by `Bot et al. <https://arxiv.org/abs/2311.15887>`_. Cluster shapes,
such as branching structures, can reveal interesting patterns 
that are not expressed in density-based cluster hierarchies. The 
BranchDetector class mimics the HDBSCAN API and can be used to
detect branching hierarchies in clusters. It provides condensed 
branch hierarchies, branch persistences, and branch memberships and 
supports joblib's caching functionality. A notebook 
`demonstrating the BranchDetector is available <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20to%20detect%20branches.ipynb>`_.

Example usage:

.. code:: python

    import hdbscan
    from sklearn.datasets import make_blobs

    data, _ = make_blobs(1000)

    clusterer = hdbscan.HDBSCAN(branch_detection_data=True).fit(data)
    branch_detector = hdbscan.BranchDetector().fit(clusterer)
    branch_detector.cluster_approximation_graph_.plot(edge_width=0.1)


Based on the paper:
    D. M. Bot, J. Peeters, J. Liesenborgs and J. Aerts
    *"FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN\* for Detecting Branches in Clusters"*
    Arxiv 2311.15887, 2023.


----------
Installing
----------

Easiest install, if you have Anaconda (thanks to conda-forge which is awesome!):

.. code:: bash

    conda install -c conda-forge hdbscan

PyPI install, presuming you have an up to date pip:

.. code:: bash

    pip install hdbscan

Binary wheels for a number of platforms are available thanks to the work of
Ryan Helinski <rlhelinski@gmail.com>.

If pip is having difficulties pulling the dependencies then we'd suggest to first upgrade
pip to at least version 10 and try again:

.. code:: bash

    pip install --upgrade pip
    pip install hdbscan

Otherwise install the dependencies manually using anaconda followed by pulling hdbscan from pip:

.. code:: bash

    conda install cython
    conda install numpy scipy
    conda install scikit-learn
    pip install hdbscan


For a manual install of the latest code directly from GitHub:

.. code:: bash

    pip install --upgrade git+https://github.com/scikit-learn-contrib/hdbscan.git#egg=hdbscan


Alternatively download the package, install requirements, and manually run the installer:


.. code:: bash

    wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip
    unzip master.zip
    rm master.zip
    cd hdbscan-master
    
    pip install -r requirements.txt
    
    python setup.py install

-----------------
Running the Tests
-----------------

The package tests can be run after installation using the command:

.. code:: bash

    nosetests -s hdbscan

or, if ``nose`` is installed but ``nosetests`` is not in your ``PATH`` variable:

.. code:: bash

    python -m nose -s hdbscan

If one or more of the tests fail, please report a bug at https://github.com/scikit-learn-contrib/hdbscan/issues/new

--------------
Python Version
--------------

The hdbscan library supports both Python 2 and Python 3. However we recommend Python 3 as the better option if it is available to you.
    
----------------
Help and Support
----------------

For simple issues you can consult the `FAQ <https://hdbscan.readthedocs.io/en/latest/faq.html>`_ in the documentation.
If your issue is not suitably resolved there, please check the `issues <https://github.com/scikit-learn-contrib/hdbscan/issues>`_ on github. Finally, if no solution is available there feel free to `open an issue <https://github.com/scikit-learn-contrib/hdbscan/issues/new>`_ ; the authors will attempt to respond in a reasonably timely fashion.

------------
Contributing
------------

We welcome contributions in any form! Assistance with documentation, particularly expanding tutorials,
is always welcome. To contribute please `fork the project <https://github.com/scikit-learn-contrib/hdbscan/issues#fork-destination-box>`_ make your changes and submit a pull request. We will do our best to work through any issues with
you and get your code merged into the main branch.

------
Citing
------

If you have used this codebase in a scientific publication and wish to cite it, please use the `Journal of Open Source Software article <http://joss.theoj.org/papers/10.21105/joss.00205>`_.

    L. McInnes, J. Healy, S. Astels, *hdbscan: Hierarchical density based clustering*
    In: Journal of Open Source Software, The Open Journal, volume 2, number 11.
    2017
    
.. code:: bibtex

    @article{mcinnes2017hdbscan,
      title={hdbscan: Hierarchical density based clustering},
      author={McInnes, Leland and Healy, John and Astels, Steve},
      journal={The Journal of Open Source Software},
      volume={2},
      number={11},
      pages={205},
      year={2017}
    }
    
To reference the high performance algorithm developed in this library please cite our paper in ICDMW 2017 proceedings.

    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* 
    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.
    2017


.. code:: bibtex

    @inproceedings{mcinnes2017accelerated,
      title={Accelerated Hierarchical Density Based Clustering},
      author={McInnes, Leland and Healy, John},
      booktitle={Data Mining Workshops (ICDMW), 2017 IEEE International Conference on},
      pages={33--42},
      year={2017},
      organization={IEEE}
    }

If you used the branch-detection functionality in this codebase in a scientific publication and which to cite it, please use the `Arxiv preprint <https://arxiv.org/abs/2311.15887>`_: 

    D. M. Bot, J. Peeters, J. Liesenborgs and J. Aerts
    *"FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN\* for Detecting Branches in Clusters"*
    Arxiv 2311.15887, 2023.

.. code:: bibtex

    @misc{bot2023flasc,
        title={FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN* for Detecting Branches in Clusters}, 
        author={D. M. Bot and J. Peeters and J. Liesenborgs and J. Aerts},
        year={2023},
        eprint={2311.15887},
        archivePrefix={arXiv},
        primaryClass={cs.LG},
        url={https://arxiv.org/abs/2311.15887}, 
    }

---------
Licensing
---------

The hdbscan package is 3-clause BSD licensed. Enjoy.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/scikit-learn-contrib/hdbscan",
    "name": "hdbscan",
    "maintainer": "Leland McInnes",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "leland.mcinnes@gmail.com",
    "keywords": "cluster clustering density hierarchical",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c1/84/6b010387b795f774e1ec695df3c8660c15abd041783647d5e7e4076bfc6b/hdbscan-0.8.40.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/hdbscan.svg\n    :target: https://pypi.python.org/pypi/hdbscan/\n    :alt: PyPI Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/version.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge Version\n.. image:: https://anaconda.org/conda-forge/hdbscan/badges/downloads.svg\n    :target: https://anaconda.org/conda-forge/hdbscan\n    :alt: Conda-forge downloads\n.. image:: https://img.shields.io/pypi/l/hdbscan.svg\n    :target: https://github.com/scikit-learn-contrib/hdbscan/blob/master/LICENSE\n    :alt: License\n.. image:: https://travis-ci.org/scikit-learn-contrib/hdbscan.svg\n    :target: https://travis-ci.org/scikit-learn-contrib/hdbscan\n    :alt: Travis Build Status\n.. image:: https://codecov.io/gh/scikit-learn-contrib/hdbscan/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/scikit-learn-contrib/hdbscan\n    :alt: Test Coverage\n.. image:: https://readthedocs.org/projects/hdbscan/badge/?version=latest\n    :target: https://hdbscan.readthedocs.org\n    :alt: Docs\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00205/status.svg\n    :target: http://joss.theoj.org/papers/10.21105/joss.00205\n    :alt: JOSS article\n.. image:: https://mybinder.org/badge.svg \n    :target: https://mybinder.org/v2/gh/scikit-learn-contrib/hdbscan\n    :alt: Launch example notebooks in Binder\n\n\n=======\nHDBSCAN\n=======\n\nHDBSCAN - Hierarchical Density-Based Spatial Clustering of Applications\nwith Noise. Performs DBSCAN over varying epsilon values and integrates \nthe result to find a clustering that gives the best stability over epsilon.\nThis allows HDBSCAN to find clusters of varying densities (unlike DBSCAN),\nand be more robust to parameter selection.\n\nIn practice this means that HDBSCAN returns a good clustering straight\naway with little or no parameter tuning -- and the primary parameter,\nminimum cluster size, is intuitive and easy to select.\n\nHDBSCAN is ideal for exploratory data analysis; it's a fast and robust\nalgorithm that you can trust to return meaningful clusters (if there\nare any).\n\nBased on the papers:\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017 `[pdf] <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8215642>`_\n\n    R. Campello, D. Moulavi, and J. Sander, *Density-Based Clustering Based on\n    Hierarchical Density Estimates*\n    In: Advances in Knowledge Discovery and Data Mining, Springer, pp 160-172.\n    2013\n    \nDocumentation, including tutorials, are available on ReadTheDocs at http://hdbscan.readthedocs.io/en/latest/ .  \n    \nNotebooks `comparing HDBSCAN to other clustering algorithms <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb>`_, explaining `how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ and `comparing performance with other python clustering implementations <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ are available.\n\n------------------\nHow to use HDBSCAN\n------------------\n\nThe hdbscan package inherits from sklearn classes, and thus drops in neatly\nnext to other sklearn clusterers with an identical calling API. Similarly it\nsupports input in a variety of formats: an array (or pandas dataframe, or\nsparse matrix) of shape ``(num_samples x num_features)``; an array (or sparse matrix)\ngiving a distance matrix between samples.\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.HDBSCAN(min_cluster_size=10)\n    cluster_labels = clusterer.fit_predict(data)\n\n-----------\nPerformance\n-----------\n\nSignificant effort has been put into making the hdbscan implementation as fast as \npossible. It is `orders of magnitude faster than the reference implementation <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Python%20vs%20Java.ipynb>`_ in Java,\nand is currently faster than highly optimized single linkage implementations in C and C++.\n`version 0.7 performance can be seen in this notebook <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations-v0.7.ipynb>`_ .\nIn particular `performance on low dimensional data is better than sklearn's DBSCAN <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/Benchmarking%20scalability%20of%20clustering%20implementations%202D%20v0.7.ipynb>`_ ,\nand via support for caching with joblib, re-clustering with different parameters\ncan be almost free.\n\n------------------------\nAdditional functionality\n------------------------\n\nThe hdbscan package comes equipped with visualization tools to help you\nunderstand your clustering results. After fitting data the clusterer\nobject has attributes for:\n\n* The condensed cluster hierarchy\n* The robust single linkage cluster hierarchy\n* The reachability distance minimal spanning tree\n\nAll of which come equipped with methods for plotting and converting\nto Pandas or NetworkX for further analysis. See the notebook on\n`how HDBSCAN works <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20HDBSCAN%20Works.ipynb>`_ for examples and further details.\n\nThe clusterer objects also have an attribute providing cluster membership\nstrengths, resulting in optional soft clustering (and no further compute \nexpense). Finally each cluster also receives a persistence score giving\nthe stability of the cluster over the range of distance scales present\nin the data. This provides a measure of the relative strength of clusters.\n\n-----------------\nOutlier Detection\n-----------------\n\nThe HDBSCAN clusterer objects also support the GLOSH outlier detection algorithm. \nAfter fitting the clusterer to data the outlier scores can be accessed via the\n``outlier_scores_`` attribute. The result is a vector of score values, one for\neach data point that was fit. Higher scores represent more outlier like objects.\nSelecting outliers via upper quantiles is often a good approach.\n\nBased on the paper:\n    R.J.G.B. Campello, D. Moulavi, A. Zimek and J. Sander \n    *Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection*, \n    ACM Trans. on Knowledge Discovery from Data, Vol 10, 1 (July 2015), 1-51.\n\n---------------------\nRobust single linkage\n---------------------\n\nThe hdbscan package also provides support for the *robust single linkage*\nclustering algorithm of Chaudhuri and Dasgupta. As with the HDBSCAN \nimplementation this is a high performance version of the algorithm \noutperforming scipy's standard single linkage implementation. The\nrobust single linkage hierarchy is available as an attribute of\nthe robust single linkage clusterer, again with the ability to plot\nor export the hierarchy, and to extract flat clusterings at a given\ncut level and gamma value.\n\nExample usage:\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n    \n    data, _ = make_blobs(1000)\n    \n    clusterer = hdbscan.RobustSingleLinkage(cut=0.125, k=7)\n    cluster_labels = clusterer.fit_predict(data)\n    hierarchy = clusterer.cluster_hierarchy_\n    alt_labels = hierarchy.get_clusters(0.100, 5)\n    hierarchy.plot()\n\n\nBased on the paper:\n    K. Chaudhuri and S. Dasgupta.\n    *\"Rates of convergence for the cluster tree.\"*\n    In Advances in Neural Information Processing Systems, 2010.\n\n----------------\nBranch detection\n----------------\n\nThe hdbscan package supports a branch-detection post-processing step \nby `Bot et al. <https://arxiv.org/abs/2311.15887>`_. Cluster shapes,\nsuch as branching structures, can reveal interesting patterns \nthat are not expressed in density-based cluster hierarchies. The \nBranchDetector class mimics the HDBSCAN API and can be used to\ndetect branching hierarchies in clusters. It provides condensed \nbranch hierarchies, branch persistences, and branch memberships and \nsupports joblib's caching functionality. A notebook \n`demonstrating the BranchDetector is available <http://nbviewer.jupyter.org/github/scikit-learn-contrib/hdbscan/blob/master/notebooks/How%20to%20detect%20branches.ipynb>`_.\n\nExample usage:\n\n.. code:: python\n\n    import hdbscan\n    from sklearn.datasets import make_blobs\n\n    data, _ = make_blobs(1000)\n\n    clusterer = hdbscan.HDBSCAN(branch_detection_data=True).fit(data)\n    branch_detector = hdbscan.BranchDetector().fit(clusterer)\n    branch_detector.cluster_approximation_graph_.plot(edge_width=0.1)\n\n\nBased on the paper:\n    D. M. Bot, J. Peeters, J. Liesenborgs and J. Aerts\n    *\"FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN\\* for Detecting Branches in Clusters\"*\n    Arxiv 2311.15887, 2023.\n\n\n----------\nInstalling\n----------\n\nEasiest install, if you have Anaconda (thanks to conda-forge which is awesome!):\n\n.. code:: bash\n\n    conda install -c conda-forge hdbscan\n\nPyPI install, presuming you have an up to date pip:\n\n.. code:: bash\n\n    pip install hdbscan\n\nBinary wheels for a number of platforms are available thanks to the work of\nRyan Helinski <rlhelinski@gmail.com>.\n\nIf pip is having difficulties pulling the dependencies then we'd suggest to first upgrade\npip to at least version 10 and try again:\n\n.. code:: bash\n\n    pip install --upgrade pip\n    pip install hdbscan\n\nOtherwise install the dependencies manually using anaconda followed by pulling hdbscan from pip:\n\n.. code:: bash\n\n    conda install cython\n    conda install numpy scipy\n    conda install scikit-learn\n    pip install hdbscan\n\n\nFor a manual install of the latest code directly from GitHub:\n\n.. code:: bash\n\n    pip install --upgrade git+https://github.com/scikit-learn-contrib/hdbscan.git#egg=hdbscan\n\n\nAlternatively download the package, install requirements, and manually run the installer:\n\n\n.. code:: bash\n\n    wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip\n    unzip master.zip\n    rm master.zip\n    cd hdbscan-master\n    \n    pip install -r requirements.txt\n    \n    python setup.py install\n\n-----------------\nRunning the Tests\n-----------------\n\nThe package tests can be run after installation using the command:\n\n.. code:: bash\n\n    nosetests -s hdbscan\n\nor, if ``nose`` is installed but ``nosetests`` is not in your ``PATH`` variable:\n\n.. code:: bash\n\n    python -m nose -s hdbscan\n\nIf one or more of the tests fail, please report a bug at https://github.com/scikit-learn-contrib/hdbscan/issues/new\n\n--------------\nPython Version\n--------------\n\nThe hdbscan library supports both Python 2 and Python 3. However we recommend Python 3 as the better option if it is available to you.\n    \n----------------\nHelp and Support\n----------------\n\nFor simple issues you can consult the `FAQ <https://hdbscan.readthedocs.io/en/latest/faq.html>`_ in the documentation.\nIf your issue is not suitably resolved there, please check the `issues <https://github.com/scikit-learn-contrib/hdbscan/issues>`_ on github. Finally, if no solution is available there feel free to `open an issue <https://github.com/scikit-learn-contrib/hdbscan/issues/new>`_ ; the authors will attempt to respond in a reasonably timely fashion.\n\n------------\nContributing\n------------\n\nWe welcome contributions in any form! Assistance with documentation, particularly expanding tutorials,\nis always welcome. To contribute please `fork the project <https://github.com/scikit-learn-contrib/hdbscan/issues#fork-destination-box>`_ make your changes and submit a pull request. We will do our best to work through any issues with\nyou and get your code merged into the main branch.\n\n------\nCiting\n------\n\nIf you have used this codebase in a scientific publication and wish to cite it, please use the `Journal of Open Source Software article <http://joss.theoj.org/papers/10.21105/joss.00205>`_.\n\n    L. McInnes, J. Healy, S. Astels, *hdbscan: Hierarchical density based clustering*\n    In: Journal of Open Source Software, The Open Journal, volume 2, number 11.\n    2017\n    \n.. code:: bibtex\n\n    @article{mcinnes2017hdbscan,\n      title={hdbscan: Hierarchical density based clustering},\n      author={McInnes, Leland and Healy, John and Astels, Steve},\n      journal={The Journal of Open Source Software},\n      volume={2},\n      number={11},\n      pages={205},\n      year={2017}\n    }\n    \nTo reference the high performance algorithm developed in this library please cite our paper in ICDMW 2017 proceedings.\n\n    McInnes L, Healy J. *Accelerated Hierarchical Density Based Clustering* \n    In: 2017 IEEE International Conference on Data Mining Workshops (ICDMW), IEEE, pp 33-42.\n    2017\n\n\n.. code:: bibtex\n\n    @inproceedings{mcinnes2017accelerated,\n      title={Accelerated Hierarchical Density Based Clustering},\n      author={McInnes, Leland and Healy, John},\n      booktitle={Data Mining Workshops (ICDMW), 2017 IEEE International Conference on},\n      pages={33--42},\n      year={2017},\n      organization={IEEE}\n    }\n\nIf you used the branch-detection functionality in this codebase in a scientific publication and which to cite it, please use the `Arxiv preprint <https://arxiv.org/abs/2311.15887>`_: \n\n    D. M. Bot, J. Peeters, J. Liesenborgs and J. Aerts\n    *\"FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN\\* for Detecting Branches in Clusters\"*\n    Arxiv 2311.15887, 2023.\n\n.. code:: bibtex\n\n    @misc{bot2023flasc,\n        title={FLASC: A Flare-Sensitive Clustering Algorithm: Extending HDBSCAN* for Detecting Branches in Clusters}, \n        author={D. M. Bot and J. Peeters and J. Liesenborgs and J. Aerts},\n        year={2023},\n        eprint={2311.15887},\n        archivePrefix={arXiv},\n        primaryClass={cs.LG},\n        url={https://arxiv.org/abs/2311.15887}, \n    }\n\n---------\nLicensing\n---------\n\nThe hdbscan package is 3-clause BSD licensed. Enjoy.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Clustering based on density with variable density clusters",
    "version": "0.8.40",
    "project_urls": {
        "Homepage": "http://github.com/scikit-learn-contrib/hdbscan"
    },
    "split_keywords": [
        "cluster",
        "clustering",
        "density",
        "hierarchical"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2cce489bb941c77e67f6bdc7b47f28318780fd478db655113a073cf7c89cd8f5",
                "md5": "14704b22e105de9e022cac97573323a9",
                "sha256": "811a248e57353a4aa815019176879fd16bace55ed633583a6b47734edcb5397c"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp310-cp310-macosx_12_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "14704b22e105de9e022cac97573323a9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 813672,
            "upload_time": "2024-11-18T16:14:59",
            "upload_time_iso_8601": "2024-11-18T16:14:59.129779Z",
            "url": "https://files.pythonhosted.org/packages/2c/ce/489bb941c77e67f6bdc7b47f28318780fd478db655113a073cf7c89cd8f5/hdbscan-0.8.40-cp310-cp310-macosx_12_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ad911564d3ebfe7429fb2e54356b07b2e44ac3dca668c47401d98170809a2f6",
                "md5": "8cf4c9f40c966367a8b62eb9fed8b723",
                "sha256": "cda06a6f4e65c6c34bed083bb8cdf29fdb1ffcb15580829d79b2906c7bdc6dbc"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8cf4c9f40c966367a8b62eb9fed8b723",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 4244270,
            "upload_time": "2024-11-18T16:14:10",
            "upload_time_iso_8601": "2024-11-18T16:14:10.512075Z",
            "url": "https://files.pythonhosted.org/packages/8a/d9/11564d3ebfe7429fb2e54356b07b2e44ac3dca668c47401d98170809a2f6/hdbscan-0.8.40-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97ebfd2093176b439d6741e92996f6d1d7273ddb0819de59934bc64fe2b1c308",
                "md5": "2a172371e7ca03bd599e1b5d0621a510",
                "sha256": "9ba82e510508921e0b30a234b639f5d84a7d475746e7db814517c5c4d1589016"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2a172371e7ca03bd599e1b5d0621a510",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 730887,
            "upload_time": "2024-11-18T16:18:28",
            "upload_time_iso_8601": "2024-11-18T16:18:28.006155Z",
            "url": "https://files.pythonhosted.org/packages/97/eb/fd2093176b439d6741e92996f6d1d7273ddb0819de59934bc64fe2b1c308/hdbscan-0.8.40-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "266b88b8c8023c0c0b27589ad83c82084a1b751917a3e09bdf7fcacf7e6bd523",
                "md5": "2f5853b6b45357100ff80203940456b6",
                "sha256": "5e958f0d7a33cd2b5e8e927b47f7360bf8a3e7d72355dd65a701e8aabe407b27"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp311-cp311-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "2f5853b6b45357100ff80203940456b6",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 1491349,
            "upload_time": "2024-11-18T16:16:10",
            "upload_time_iso_8601": "2024-11-18T16:16:10.666234Z",
            "url": "https://files.pythonhosted.org/packages/26/6b/88b8c8023c0c0b27589ad83c82084a1b751917a3e09bdf7fcacf7e6bd523/hdbscan-0.8.40-cp311-cp311-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3ef32c8a0b3dc6e6c4e433b85b30c3723d8eb48d115c0185b82ab89e1a0ef89",
                "md5": "5691715842e139e8664b90012a9780ba",
                "sha256": "6e0d6197ee045b173e1f16e6884386f335a56091e373a839dd24f7331a8fa9ed"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5691715842e139e8664b90012a9780ba",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 4576215,
            "upload_time": "2024-11-18T16:14:11",
            "upload_time_iso_8601": "2024-11-18T16:14:11.241873Z",
            "url": "https://files.pythonhosted.org/packages/a3/ef/32c8a0b3dc6e6c4e433b85b30c3723d8eb48d115c0185b82ab89e1a0ef89/hdbscan-0.8.40-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64b196c347c7740efa1ac803be64155159284f92fafcff88c1077344e64eead5",
                "md5": "789d081d4f610cabf0e668423f45c999",
                "sha256": "127cbe8c858dc77adfde33a3e1ce4f3bea810f78b01d2bd47b1147d4b5a50472"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "789d081d4f610cabf0e668423f45c999",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 732173,
            "upload_time": "2024-11-18T16:18:40",
            "upload_time_iso_8601": "2024-11-18T16:18:40.361180Z",
            "url": "https://files.pythonhosted.org/packages/64/b1/96c347c7740efa1ac803be64155159284f92fafcff88c1077344e64eead5/hdbscan-0.8.40-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33ff4739886abb990dc6feb7b02eafb38a7eaf090fffef6336e70a03d693f433",
                "md5": "ccfe4322280c91a7b48e948acc307eb4",
                "sha256": "353eaa22e42bee69df095744dbb8b29360e516bd9dcb84580dceeeb755f004cc"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp312-cp312-macosx_10_13_universal2.whl",
            "has_sig": false,
            "md5_digest": "ccfe4322280c91a7b48e948acc307eb4",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 1497291,
            "upload_time": "2024-11-18T16:16:54",
            "upload_time_iso_8601": "2024-11-18T16:16:54.731976Z",
            "url": "https://files.pythonhosted.org/packages/33/ff/4739886abb990dc6feb7b02eafb38a7eaf090fffef6336e70a03d693f433/hdbscan-0.8.40-cp312-cp312-macosx_10_13_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0cb6b4254f8a33e075118512e55acf3485c155ea52c6c35d69a985bdc59297c",
                "md5": "5dc8bfb9e23cd12bc77313e0c4a72ada",
                "sha256": "1b55a935ed7b329adac52072e1c4028979dfc54312ca08de2deece9c97d6ebb1"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "5dc8bfb9e23cd12bc77313e0c4a72ada",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 726198,
            "upload_time": "2024-11-18T16:18:09",
            "upload_time_iso_8601": "2024-11-18T16:18:09.990903Z",
            "url": "https://files.pythonhosted.org/packages/c0/cb/6b4254f8a33e075118512e55acf3485c155ea52c6c35d69a985bdc59297c/hdbscan-0.8.40-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e235b00c64e06675eed9c68bd42dff45489efb1dd6d18dcc7b7f3564c275441",
                "md5": "e502fe76645bd69040e38fa9b8637c2e",
                "sha256": "c18947947af7f843f47c0111f21ffd5a5fd31789fcae39689a44e8b01433e504"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp38-cp38-macosx_12_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e502fe76645bd69040e38fa9b8637c2e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 820516,
            "upload_time": "2024-11-18T16:16:10",
            "upload_time_iso_8601": "2024-11-18T16:16:10.541434Z",
            "url": "https://files.pythonhosted.org/packages/8e/23/5b00c64e06675eed9c68bd42dff45489efb1dd6d18dcc7b7f3564c275441/hdbscan-0.8.40-cp38-cp38-macosx_12_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89dacccaa49b0b7480ca69e27489835b102d5e8997cda144abf829c8db2a4131",
                "md5": "ed1f2faf71cb12ac86b428eca92a335c",
                "sha256": "c5a16f38e1816ab69ad315a1eab429e5a7c725210d88e71d273496cce3a2693c"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ed1f2faf71cb12ac86b428eca92a335c",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 4347148,
            "upload_time": "2024-11-18T16:14:02",
            "upload_time_iso_8601": "2024-11-18T16:14:02.469495Z",
            "url": "https://files.pythonhosted.org/packages/89/da/cccaa49b0b7480ca69e27489835b102d5e8997cda144abf829c8db2a4131/hdbscan-0.8.40-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cceb97d9d4e8074a3231113c0fc6552e8cebfdbfcc361eeccf96f6a1765af39",
                "md5": "11c3d58f3c826497c9a7736ac951bc26",
                "sha256": "7ebe69a0ad2f86d090a518b17d4635dfc65d3402b8c453aa2942f9c7dc895b9e"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "11c3d58f3c826497c9a7736ac951bc26",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 813996,
            "upload_time": "2024-11-18T16:18:37",
            "upload_time_iso_8601": "2024-11-18T16:18:37.121386Z",
            "url": "https://files.pythonhosted.org/packages/4c/ce/b97d9d4e8074a3231113c0fc6552e8cebfdbfcc361eeccf96f6a1765af39/hdbscan-0.8.40-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9aafacf0a9fd7ed549ced9186fb754a0a28fb17116618a78195ab20321f77052",
                "md5": "236a44af90ae8d88ffe202e3e4a35f9c",
                "sha256": "cf094aeea4df4513644333b9dda408ef8ef385d0ab5f3f8681e239a9008cbeb5"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp39-cp39-macosx_12_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "236a44af90ae8d88ffe202e3e4a35f9c",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 814923,
            "upload_time": "2024-11-18T16:16:02",
            "upload_time_iso_8601": "2024-11-18T16:16:02.133442Z",
            "url": "https://files.pythonhosted.org/packages/9a/af/acf0a9fd7ed549ced9186fb754a0a28fb17116618a78195ab20321f77052/hdbscan-0.8.40-cp39-cp39-macosx_12_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9f491149998cd0dbc32b5db911dd13ac490b1801b255830d68c474acaa0827e",
                "md5": "021e93846df390e53e3d4e2e6ccb676f",
                "sha256": "05668ae7a17479a9061676290a66a810a62f2a4ec577ba18f561088b726ab01d"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "021e93846df390e53e3d4e2e6ccb676f",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 4250145,
            "upload_time": "2024-11-18T16:14:04",
            "upload_time_iso_8601": "2024-11-18T16:14:04.935480Z",
            "url": "https://files.pythonhosted.org/packages/a9/f4/91149998cd0dbc32b5db911dd13ac490b1801b255830d68c474acaa0827e/hdbscan-0.8.40-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a03296299e30b21476c5c3073b1be85a5d12a078d21cd5e1b97b37ecd8ae1b30",
                "md5": "c801302c674a8fc9e534092ea3100595",
                "sha256": "56d3057d483d112ff8e0f0a49f0d59df8c078d444dbd5dea7b987faab0c6fb49"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c801302c674a8fc9e534092ea3100595",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 811222,
            "upload_time": "2024-11-18T16:17:24",
            "upload_time_iso_8601": "2024-11-18T16:17:24.332011Z",
            "url": "https://files.pythonhosted.org/packages/a0/32/96299e30b21476c5c3073b1be85a5d12a078d21cd5e1b97b37ecd8ae1b30/hdbscan-0.8.40-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1846b010387b795f774e1ec695df3c8660c15abd041783647d5e7e4076bfc6b",
                "md5": "03717f484ee6e82a5da06a00d4999372",
                "sha256": "c9e383ff17beee0591075ff65d524bda5b5a35dfb01d218245a7ba30c8d48a17"
            },
            "downloads": -1,
            "filename": "hdbscan-0.8.40.tar.gz",
            "has_sig": false,
            "md5_digest": "03717f484ee6e82a5da06a00d4999372",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6904096,
            "upload_time": "2024-11-18T16:14:05",
            "upload_time_iso_8601": "2024-11-18T16:14:05.384073Z",
            "url": "https://files.pythonhosted.org/packages/c1/84/6b010387b795f774e1ec695df3c8660c15abd041783647d5e7e4076bfc6b/hdbscan-0.8.40.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 16:14:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scikit-learn-contrib",
    "github_project": "hdbscan",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "requirements": [],
    "lcname": "hdbscan"
}
        
Elapsed time: 0.34013s