Flare-Sensitive Clustering based on HDBSCAN*.
Project description
FLASC: Flare-Sensitive Clustering
FLASC - Flare-Sensitive Clustering, adds an efficient post-processing step to the HDBSCAN* density-based clustering algorithm to detect branching structures within clusters.
The algorithm adds two parameters that may need tuning with respect to HDBSCAN*, but both are intuitive to tune: minimum branch size and branch selection strategy.
How to use FLASC
The FLASC package is closely based on the HDBSCAN* package and supports the same API, except sparse inputs, which are not supported yet.
from flasc import FLASC
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
data = np.load('./notebooks/data/flared_clusterable_data.npy')
clusterer = FLASC(min_cluster_size=15)
clusterer.fit(data)
colors = sns.color_palette('tab10', 10)
point_colors = [
sns.desaturate(colors[l], p)
for l, p in zip(clusterer.labels_, clusterer.probabilities_)
]
plt.scatter(data[:, 0], data[:, 1], 2, point_colors, alpha=0.5)
plt.axis('off')
plt.show()
Example Notebooks
A notebook demonstrating how the algorithm works is available at How FLASC Works. The other notebooks demonstrate the algorithm on several data sets and contain the analyses presented in our paper.
Installing
Binary wheels are available on PyPI. Presuming you have an up-to-date pip:
pip install pyflasc
For a manual install of the latest code directly from GitHub:
pip install --upgrade git+https://github.com/vda-lab/pyflasc.git#egg=pyflasc
Alternatively download the package, install requirements, and manually run the installer:
wget https://github.com/vda-lab/pyflasc/archive/main.zip
unzip main.zip
rm main.zip
cd flasc-main
pip install -t .
Citing
A scientific publication of this algorithm and codebase is in progress. Please refer back to this section to see how you can cite this work in the future.
This FLASC algorithm and software package is very closely related to McInnes et al.'s HDBSCAN* software package. If you wish to cite the HDBSCAN* package in a scientific publication, please use their Journal of Open Source Software article.
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
@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 their high performance algorithm please cite their 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
@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}
}
Licensing
The FLASC package has a 3-Clause BSD license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyflasc-0.1.1.tar.gz
.
File metadata
- Download URL: pyflasc-0.1.1.tar.gz
- Upload date:
- Size: 6.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 384475ec41f9af6d9266a14f50b31799230d88359a371159620a9fa949d09a2b |
|
MD5 | 518ef1fa74881d125978e74049046463 |
|
BLAKE2b-256 | b4a0c08d7517210c1cdca2309f6517e14c61bab933f3db236176bdaeeaba3c59 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 746.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6a4c27b93be59771b180ee33376e970541c1155858ba16b00db5a78ebac5730 |
|
MD5 | 708e3f933322743415b2749cc5fcf7ad |
|
BLAKE2b-256 | 7b091b1c69aba14bbdca07bfec321802f1a797864e0fe313725e38faa56c7797 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6188c6a5414b3b4f829aaa5a63a0d530b413f48ec2be926fb58bc3da252ffd83 |
|
MD5 | c7cad6909d6fd46f6bea76c8a0756b69 |
|
BLAKE2b-256 | cf5ae94f4c9eda2b01a373e8626f995e9ef312aeedebc148ad2dfb7ca01ca9ed |
Provenance
File details
Details for the file pyflasc-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 879.0 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb7748f719d31a9ce7d06a9ced74b2fae0bbf5a714b4fc814a2e71ccc9040015 |
|
MD5 | 6f981bc70f9cf90dfcd84eb3530aa2c8 |
|
BLAKE2b-256 | 9c9828e53ca1ffffd2cab8d36ab8295b4178d207ee8e81c61084712e4d734c7c |
Provenance
File details
Details for the file pyflasc-0.1.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 755.4 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52729f9177a6b056147106b8e47117a4c93e0651e453b9c1507cc5a286d8db66 |
|
MD5 | 7f67b5852f0d7c6e5361c9658e04c599 |
|
BLAKE2b-256 | 2c9de34a7f37ca8ff07a56b8a605440a28f35c067a472e918e9295e7abea5150 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93da4ebcac85f682fbe79d495dc6d95163b7c62093bbc83e41855549de48c503 |
|
MD5 | 243f02c1ef652f711b4471abc4edf23d |
|
BLAKE2b-256 | b852e78c7e2973152a79cd6f0d7056e7e29dddc5eca51edf5c1e2f260530f051 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 894.9 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5d11b9286aa0af8b60a2fbc57ab393796eb21e7835186abbdc60de35a6c2a5 |
|
MD5 | 45e61264bd960fab11eeea209e9075db |
|
BLAKE2b-256 | 5c5630aca9d0957e25fe29882be41e2839193e3123a776d36f83035d50d16a44 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 769.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7594c3c57e4efa75f3739fea42039acdbc9c31609448eada90aadb2028b06317 |
|
MD5 | 1c791bec7916962ec05ac101d4d0375d |
|
BLAKE2b-256 | 8bb464612a1358631b798c67ea2ec8f068584c4ed29daf4c86e3983bbd7c3556 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1f168ff6f7d63b4b46597643f4526d43b0da3d96ef1b9770c05a93be3ecef6 |
|
MD5 | da3de3dbed4afaef5c0bf5738269a832 |
|
BLAKE2b-256 | 2d85299e8b47fd0ce5aa934cf193747cf2d4c640e0ce2c45ab0ed4b0934c25ef |
Provenance
File details
Details for the file pyflasc-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 900.5 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2102dcca8b98a7de1e6355b49b24bf7336140a9081dc7d43486d958a32377d9d |
|
MD5 | 484d9347927ce01740208659d63cd3e9 |
|
BLAKE2b-256 | 80a0e3bd0e5b4890d675014e7dd6a43c796aa35ece90f8613ce5387589a4f30e |
Provenance
File details
Details for the file pyflasc-0.1.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 756.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb39b209a9d1a732fbdae7a631b1eaf2796b3ea18b179b3da199deae67fec004 |
|
MD5 | 06fb213851eeb6a30dfdfc1456017765 |
|
BLAKE2b-256 | 59a0badb8bf4fdaf23766b197d895fda4c09d348c9035134e2a2658af79cba88 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f54be018478424f7e36e57529ae739f575864f458934f2a1ca407a7ba083754 |
|
MD5 | 1badb9da53ffa5cc2c522821a5c103be |
|
BLAKE2b-256 | 63a5333cdd8f5830de203942fedd31a8076870872df5834ede1b6adbf7f17310 |
Provenance
File details
Details for the file pyflasc-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyflasc-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 876.6 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e01d483e8994bc484a96619faa87f5d5591506c8567f48556c678f639656e4 |
|
MD5 | 2b550a02741c0b2f738df7881589af58 |
|
BLAKE2b-256 | 74576442000533d7cf6fac928be4df7194e15661f2f6e36e04f16d94fe0ef893 |