Skip to main content

ccHBGF - consensus clustering using Hybrid Bipartite Graph Formulation (HBGF)

Project description

ccHBGF: Graph-based Consensus Clustering

Overview of Consensus Clustering Workflow

A python-based consensus clustering function utilising Hybrid Bipartite Graph Formulation (HBGF).

The ccHBGF.find_consensus function performs consensus clustering by following these steps:

  1. Definition of a bipartite graph adjaceny matrix A
  2. Decomposition of A into a spectral embedding UVt
  3. K-means clustering of UVt into a consensus solution

Installation

pip install ccHBGF
pip install 'ccHBGF[tutorial]' # When running example notebooks

Hybrid Bipartite Graph Formulation (HBGF)

Overview of Consensus Clustering Workflow

HBGF is a graph-based consensus ensemble clustering technique. This method constructs a bipartite graph with two types of vertices: observations and clusters from different clusteirng solutions. An edge exists only between an observation vertex and a cluster vertex, indicating the object's membership in that cluster. The graph is then partitioned using spectral partitioning to derive consensus labels for all observations.

Example Usage

from ccHBGF import find_consensus, config

config.LOG_LEVEL = 2 # Info level (0=silent, 1=warnings)

consensus_labels = find_consensus(solutions_matrix, init='orthogonal', tol=0.1, random_state=0)

Where the solutions_matrix is of shape (m,n):

  • m = the number of observations
  • n = the number of different clustering solutions.

Please refer to notebooks/ for more detailed examples.

References

[1] Hu, Tianming, et al. "A comparison of three graph partitioning based methods for consensus clustering." Rough Sets and Knowledge Technology: First International Conference, RSKT 2006, Chongquing, China, July 24-26, 2006. Proceedings 1. Springer Berlin Heidelberg, 2006.

[2] Fern, Xiaoli Zhang, and Carla E. Brodley. "Solving cluster ensemble problems by bipartite graph partitioning." Proceedings of the twenty-first international conference on Machine learning. 2004.

[3] Ng, Andrew, Michael Jordan, and Yair Weiss. "On spectral clustering: Analysis and an algorithm." Advances in neural information processing systems 14 (2001).

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

cchbgf-0.2.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cchbgf-0.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file cchbgf-0.2.0.tar.gz.

File metadata

  • Download URL: cchbgf-0.2.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for cchbgf-0.2.0.tar.gz
Algorithm Hash digest
SHA256 826410369da96546918e48767bc4a1e3fd4a3df1e9c8eb7519c5c55f874de426
MD5 06d06b1de68d337900c8e089bc29fc15
BLAKE2b-256 3517670751246d24af57ba2b749b3b65c5d2aa40c35f878ceffe68d1dcc32199

See more details on using hashes here.

File details

Details for the file cchbgf-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cchbgf-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for cchbgf-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fd6fda311a45c3f5063a799b398af9162096d11140d827dada14d0ffe4ba4ae
MD5 34942b3b2d39cbf577349c8281b5ac19
BLAKE2b-256 3312322bf9247cebab8651dcd01579d7640c53b1c90a8ca340ea1d578a9fc678

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page