Skip to main content

A package for combining multiple partitions into a consolidated clustering. The combinatorial optimization problem of obtaining such a consensus clustering is reformulated in terms of approximation algorithms for graph or hyper-graph partitioning.

Installation

Cluster_Ensembles is written in Python and in C. You need Python 2.7, its Standard Library and the following packages:

  • numexpr (version 2.4.0 or later)

  • NumPy (version 1.9.0 or any ulterior version)

  • SciPy

  • scikit-learn

  • setuptools

  • PyTables

The pip install Cluster_Ensembles command mentioned below should automatically detect and, if applicable, install or update any of the afore-mentioned dependencies.

As yet another prelimiary to running Cluster_Ensembles, you should also follow the few more instructions below.

On CentOS, Fedora or some Red Hat Linux distribution:

  • open a terminal console;

  • type in: sudo dnf install glibc.i686.

This will install the GNU C library that is required to run a 32-bit executable binary with a 64-bit Linux kernel. This executable is tasked with hyper-graph partitioning. Skipping this step would result in a bad ELF interpreter error message when subsequently trying to run the Cluster_Ensembles package.

On a Debian or Ubuntu platform, the following commands should yield the same outcome:

  • open a terminal console;

  • type in: sudo dpkg --add-architecture i386 to add support for the i386 architecture;

  • enter: sudo apt-get install libc6:i386.

Upon completion of the steps outlined above, install Cluster_Ensembles by sending a request to the Python Package Index (PyPI) as follows:

  • open a terminal console;

  • enter pip install Cluster_Ensembles.

Any missing third-party dependency should be automatically resolved. Please note that as part of the installation of this package, some code written in C that will later on be required by the Cluster_Ensembles package to determine a graph partition is automatically compiled under the hood and according to the specifications of your machine. You therefore need to ensure availability of CMake and GNU make on your operating system.

Usage

Say that you have an array of shape (M, N) where each row corresponds to a vector reporting the cluster label of each of the N samples comprising your dataset. It is possible that some of those samples have been left out of consideration from some of those M clusterings; in this case, the corresponding entry is tagged as NaN (numpy.nan).

The few lines below illustrate how to submit consensus clustering analysis such an cluster_runs (M, N) array of cluster labels. A vector holding the consensus clustering identities for each of the N samples in your dataset, consensus_clustering_labels, is returned.

Please note that those M vectors of clustering labels can correspond to partitions of the samples into distinct numbers of overall clusters. Cluster_Ensembles therefore offers the possibility of seeking a consensus clustering from the aggregation of a clustering of your dataset into, say, 10 groups, another clustering of a fraction of your samples into 5 clusters, yet another partition of your dataset into 20 clusters, etc. Those choices are entirely up to you. Pretty much all that is required for Cluster_Ensembles is an array of clustering vectors.

>>> import numpy as np
>>> import Cluster_Ensembles as CE
>>> cluster_runs = np.random.randint(0, 50, (50, 15000))
>>> consensus_clustering_labels = CE.cluster_ensembles(cluster_runs, verbose = True, N_clusters_max = 50)

References

  • Giecold, G., Marco, E., Trippa, L. and Yuan, G.-C., “Robust Lineage Reconstruction from High-Dimensional Single-Cell Data”. ArXiv preprint [q-bio.QM, stat.AP, stat.CO, stat.ML]: http://arxiv.org/abs/1601.02748

  • A. Strehl and J. Ghosh, “Cluster Ensembles - A Knowledge Reuse Framework for Combining Multiple Partitions”. In: Journal of Machine Learning Research, 3, pp. 583-617. 2002

Metadata

Release files for Cluster_Ensembles 1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Cluster_Ensembles 1.16
File Size Uploaded Provenance Actions
Cluster_Ensembles-1.16.tar.gz 5.3 MB Without provenance Details for Cluster_Ensembles-1.16.tar.gz

Release files / Cluster_Ensembles-1.16.tar.gz

Download URL Cluster_Ensembles-1.16.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
acc4e45e4778c81c84dafcd6cdea0b33be5e2b90666962926ddb5feff46a7c54
BLAKE2b-256 checksum
How to use checksums
bab46449b7ef22b47ff599dbb2c007db8f05e3362964e1a796f408804913a1c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Cluster_Ensembles 1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.16 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page