CLUEstering — High-Performance Density-Based Weighted Clustering for Heterogeneous Computing
CLUEstering is a general-purpose, density-based, weighted clustering library designed for high-performance scientific computing.
It is written in C++20 and provides both C++ and Python interfaces.
CLUEstering is based on CLUE, a clustering algorithm developed at CERN. CLUE combines the flexibility of density-based clustering with the generality of weighted clustering. Unlike traditional density-based methods, CLUE integrates point weights directly into the computation of local densities—making weights an intrinsic part of the clustering logic rather than an external modifier.
CLUE is also designed for parallel execution, scaling linearly with problem size and performing efficiently on massively parallel architectures such as GPUs and FPGAs.
To maximize hardware portability and performance, CLUEstering’s backend is implemented using alpaka,
a high-efficiency abstraction library for performance portability across CPUs, GPUs, and other accelerators.
Installation
C++ API
CLUEstering can be installed via CMake. It requires a C++20 compliant compiler and CMake 3.16 or higher. To install CLUEstering globally on your system, first clone the repository or download on the the release tarballs from the archive, then install with the following commands:
cd <CLUEstering-folder> && mkdir build
cmake -B build -DCMAKE_INSTALL_PREFIX=/desired/installation/path
cmake --install build
where the installation step may require sudo privileges depending on the chosen installation path.
Then you can link CLUEstering to your project using CMake's find_package:
find_package(CLUEstering REQUIRED)
add_executable(your_target your_source.cpp)
target_link_libraries(your_target PRIVATE CLUEstering::CLUEstering)
target_compile_options(your_target PRIVATE ALPAKA_FLAG)
where the ALPAKA_FLAG is a CMake variable used to specify the desired alpaka backend. For the list of available backends and their corresponding flags,
please look at the subsetion below.
Python API
From PyPi
CLUEstering is available on the PyPi repository, and can be easily installed with:
pip install CLUEstering
On Linux (x86_64 and aarch64) this installs a precompiled wheel, which includes the serial and OpenMP CPU backends. On the other platforms pip downloads the source distribution and compiles it, as described below.
GPU backends
The precompiled wheels don't include the CUDA and HIP backends. To use them, CLUEstering has to be compiled on the machine where it will run, by forcing pip to build it from source:
pip install -v --no-binary CLUEstering CLUEstering
The CUDA backend is compiled if nvcc is found (in PATH or through the CUDACXX environment variable)
and the HIP backend if the ROCm compiler is found (in PATH or through HIPCXX).
The CUDA backend is compiled for the GPU architecture of the machine where the build runs, so it must be run on a machine with
the target GPU.
The TBB backend is also compiled only when building from source, if TBB is found.
You can check which backends are available with:
python -c "import CLUEstering; print(CLUEstering.backends)"
If CLUEstering is already installed from a wheel, add --force-reinstall to replace it.
From source
CLUEstering can also be compiled and installed from source. To do so, first clone the repository
recursively or download one of the release tarballs from archive.
Then, inside the root directory install it using pip:
pip install -v .
where the -v flag is optional but suggested because provides more details during the compilation process.
This will automatically fetch the build dependencies and compile all the supported backends.
Heterogeneous backends support
CLUEstering leverages the alpaka library to provide support for multiple backends without any code duplications.
The table below lists the currently supported backends and the corresponding CMake flags to enable them:
| Backend | CMake Flag |
|---|---|
| Serial | ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED |
| OpenMP | ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLED |
| TBB | ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLED |
| CUDA | ALPAKA_ACC_GPU_CUDA_T_SEQ_ENABLED |
| HIP | ALPAKA_ACC_GPU_HIP_T_SEQ_ENABLED |
For the list of supported compiler versions for each backend, please refer to the alpaka documentation.
Quick example
C++ API
Here is basic example of how to use CLUEstering in C++:
#include <CLUEstering/CLUEstering.hpp>
int main() {
// Obtain the queue, which is used for allocations and kernel launches.
auto queue = clue::get_queue(0u);
// Allocate the points on the host
clue::PointsHost<2> points = clue::read_csv<2, float>(queue, "data.csv");
// Define the parameters for the clustering and construct the clusterer.
const auto density_radius = 20.f, min_density = 10.f;
clue::Clusterer<2> algo(queue, density_radius, min_density);
// Launch the clustering
// The results will be stored in the `clue::PointsHost` object
algo.make_clusters(queue, points);
auto clusters_indexes = points.clusterIndexes(); // Get the cluster indexes (labels)
auto clusters = points.clusters(); // Get the clusters-to-point associations
}
This example reads a set of 2D points from a CSV file, performs clustering using CLUE, and retrieves the cluster assignments for each point. For more detailed examples and usage instructions, please refer to the documentation.
Python API
Here is a basic example of how to use CLUEstering in Python:
import CLUEstering as clue
clusterer = clue.clusterer(1., 5.)
clusterer.read_data(data)
clusterer.run_clue()
clusterer.cluster_plotter()
clusterer.to_csv('output_folder', 'data_results.csv')
The data can be provided in many different formats, including numpy arrays, pandas DataFrames, and CSV files.
References and citing
- M. Rovere et al., CLUE: A Fast Parallel Clustering Algorithm for High-Density Environments, Front. Big Data (2020)
- S. Balducci, CLUEstering: a high-performance density-based clustering library for scientific computing, UNIBO Master Thesis (2024)
- S. Balducci et al., CLUE: A Scalable Clustering Algorithm for the Data Challenges of Tomorrow, CERN EP newsletter (2025)
- S. Balducci et al., CLUEstering: a novel high-performance clustering library for scientific computing, 23rd International Workshop on Advanced Computing and Analysis Techniques in Physics Research (ACAT 2025)
To cite this software directly, please use the following BibTeX entry:
@misc{CLUEstering,
title = {{CLUEstering}},
author = {Balducci, Simone and Pantaleo, Felice and Perego, Aurora and
Redjeb, Wahid and Rovere, Marco and Giacomini, Francesco},
publisher = {Zenodo},
year = {2026},
doi = {10.5281/zenodo.20270689},
url = {https://doi.org/10.5281/zenodo.20270689},
note = {Software}
}
Metadata
Release files for CLUEstering 2.14.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cluestering-2.14.2.tar.gz | 1.3 MB | With provenance | Details for cluestering-2.14.2.tar.gz |
Built distributions (wheels)
Total release size: 15.0 MB
Release files / cluestering-2.14.2.tar.gz
| Download URL | cluestering-2.14.2.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
defbf747edbda9ca01efd9c1283a6e061ff78c615a4a6a5ec1a1d49413801d6d
|
|
BLAKE2b-256 checksum How to use checksums |
6669177b10ead0df2c8ab1c6ab06398060b0e2fbc27cde6ba3c1b0103e3c4b6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp315-cp315-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp315-cp315-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.15 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
1cec8d79414f4447b588246e312057cc4d14d36a951c2f40a56f73102d1fc53e
|
|
BLAKE2b-256 checksum How to use checksums |
bcd72b0784d3035332d14c93c691b1e607cb4c4e93f4605f9d18db9fecec0d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp315-cp315-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp315-cp315-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 887.1 kB |
| Tags | CPython 3.15 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d9fdb43eec233817374d745656619d797a2515ae9651cf31d61f2ca0034ca01
|
|
BLAKE2b-256 checksum How to use checksums |
0bb672cd4e5bec70506fd8dd0d1ce62f4163d6f2dc99480c57658828e13c463c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ddde2a03f34ba69fe1f3061c1f406854feaaa1460c4217cb129c1b6dce589410
|
|
BLAKE2b-256 checksum How to use checksums |
854fe99eb6eb14e5e72af7913ed148005bfe0928ccdda7ffdd4d1af0680b3a59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp314-cp314-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp314-cp314-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 886.9 kB |
| Tags | CPython 3.14 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
3186e714c4234953479f06662f40283a6a755d211c4fb8367c09f3e4cffb0f7d
|
|
BLAKE2b-256 checksum How to use checksums |
aac34d736d737e1eac67b0b9b3ec85fd7b654cb8c300587dbdaa840691f870c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp313-cp313-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp313-cp313-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d2d12457e3b21bdc06a51ec9ad0532cfc36add5da34a2cb3dfae49f3c4895fa
|
|
BLAKE2b-256 checksum How to use checksums |
1db952ce74b7484495c8171d93bea8ba7c0682dba33a0ecf5419c11ba51a4be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp313-cp313-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp313-cp313-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 886.0 kB |
| Tags | CPython 3.13 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
19675cd1dd57234c964e20dfd24cf33ce3672c3c2420cda085678de9e584d2cb
|
|
BLAKE2b-256 checksum How to use checksums |
7a807262d2fcc29c74dfef03948d18f6447bf1a9b9a89713f23ae285adbcd2b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
45c31f53ee00180011107946846e0f9bf87adcd9959236b043e442187b6a120d
|
|
BLAKE2b-256 checksum How to use checksums |
3ca99e5b23aa3aec8c8413aa670ee31e84ff67455dd2be7defac5c219b0dee08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp312-cp312-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp312-cp312-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 886.3 kB |
| Tags | CPython 3.12 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
e85c57dea8b03763b79122b779616b8dcd3aecd21b82c53851be3a5eb767d22a
|
|
BLAKE2b-256 checksum How to use checksums |
90b7f9f2045e2f0e87d4c15264c554bd2cac7376188e35c9171177989eb52df4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
2fe8c86d4b299da14d1d2c7b5b1588fccc5d6e6dee4796abfa458ba8ffca3dc3
|
|
BLAKE2b-256 checksum How to use checksums |
da53eea0a0bf04e07e142b90b0bdf0cc19a8d406ed45873bb0892f9b7d62a8a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp311-cp311-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp311-cp311-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 890.2 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
e49d9d6783ecdc26d8e2d324e313518bd7d6b2feab3dfd23f62bada7b22ad1fe
|
|
BLAKE2b-256 checksum How to use checksums |
bbe04e903e4240bb5e362439709ffc41b892ea70af6249544fe82a28d4bd7ac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
ce03e026ab14dc3bb69b0b89f5e7a6fdbc391a2891871f5a89790076a2b869f1
|
|
BLAKE2b-256 checksum How to use checksums |
f15657d70df023b972e9c3d2fb53326d623f119e1b5c899f90da4c21bf461052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp310-cp310-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp310-cp310-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 890.8 kB |
| Tags | CPython 3.10 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
87ae7b6441b7abe4db91eaa41f124bc01ceb913fd09d25e06e08d89c2872cd86
|
|
BLAKE2b-256 checksum How to use checksums |
88752c6a7aae57ec55ce1921c6ea6396bba105003af8360a209d2d5f625b9f99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp39-cp39-manylinux_2_34_x86_64.whl
| Download URL | cluestering-2.14.2-cp39-cp39-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
5ea73f8c1dcb0407cc894c0e5a8c99f4a61d078d061abdf6e54c15c04a54cc37
|
|
BLAKE2b-256 checksum How to use checksums |
8f37e5d3ee1414172fe1a0de8d7c355725a05da5e0eb79a18a5600ba37e2158d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cluestering-2.14.2-cp39-cp39-manylinux_2_34_aarch64.whl
| Download URL | cluestering-2.14.2-cp39-cp39-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 891.1 kB |
| Tags | CPython 3.9 Linux glibc 2.34+ ARM64 |
|
SHA-256 checksum How to use checksums |
d1ad1a55a732661493a6972db40c955265701c6b49ea2ef7b271478c6f836238
|
|
BLAKE2b-256 checksum How to use checksums |
0689bb77fbf36bc938ebf52ebb01de11d4c9163906d7b9adff9b7fed622e67b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for CLUEstering 2.14.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 15 files in this release have been uploaded with provenance metadata.
Attestation for cluestering-2.14.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.