Skip to main content

G-CoMVKM

Globally Collaborative Multi-View k-Means Clustering

PyPI version License: MIT

Overview

G-CoMVKM is a Python implementation of the Globally Collaborative Multi-View k-Means clustering algorithm, originally developed by Kristina P. Sinaga. The algorithm integrates a collaborative transfer learning framework with entropy-regularized feature-view reduction, enabling dynamic elimination of uninformative components. This method achieves clustering by balancing local view importance and global consensus.

Installation

You can install G-CoMVKM directly from PyPI:

pip install gcomvkm

Requirements

  • Python 3.7+
  • NumPy
  • SciPy
  • Matplotlib
  • scikit-learn
  • seaborn

Usage

from gcomvkm import GCoMVKM
from gcomvkm.utils import load_synthetic_data
from gcomvkm.evaluation import nmi, rand_index, adjusted_rand_index

# Load the dataset
X, label = load_synthetic_data()

# Create and fit the model
model = GCoMVKM(
    n_clusters=2,
    gamma=5.0,
    theta=4.0,
    max_iter=100,
    tol=1e-4,
    verbose=True,
    random_state=42
)

model.fit(X)

# Get the cluster assignments
predicted_labels = model.labels_

# Evaluate the clustering performance
nmi_score = nmi(label, predicted_labels)
ri_score = rand_index(label, predicted_labels)
ari_score = adjusted_rand_index(label, predicted_labels)

print(f"NMI: {nmi_score:.4f}")
print(f"RI: {ri_score:.4f}")
print(f"ARI: {ari_score:.4f}")

Algorithm Parameters

  • n_clusters: Number of clusters to form
  • gamma: Exponent parameter to control the weights of V (typically in range [0,1])
  • theta: Coefficient parameter to control the weights of W (typically > 0)
  • max_iter: Maximum number of iterations
  • tol: Convergence tolerance
  • verbose: Whether to print progress information
  • random_state: Random seed for reproducibility

Features

  • Multi-view clustering with feature and view weighting
  • Automatic dimensionality reduction through entropy regularization
  • Balanced local and global consensus clustering
  • Comprehensive evaluation metrics

Citation

If you use this package in your research, please cite the original paper:

@article{sinaga2025gcomvkm,
  title={A Globally Collaborative Multi-View k-Means Clustering},
  author={Sinaga, Kristina P.},
  journal={MDPI Electronics},
  year={2025}
}

License

This project is licensed under the MIT License - see the LICENSE file for details. 6. Performance metrics across different initializations 7. Convergence plot

References

This implementation is based on the MATLAB code by Kristina P. Sinaga. For more details about the algorithm, please refer to the original paper.

Metadata

Release files for gcomvkm 0.1.0

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

Source distribution (sdist)

Source distribution for gcomvkm 0.1.0
File Size Uploaded
gcomvkm-0.1.0.tar.gz 55.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gcomvkm 0.1.0
File Interpreter ABI Platform
gcomvkm-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 110.0 kB

Release files / gcomvkm-0.1.0.tar.gz

Download URL gcomvkm-0.1.0.tar.gz
Size 55.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a662e2edb55de4d63c5fa33de310523f7f4d17bdb8bcd217f580315d84fb5f79
BLAKE2b-256 checksum
How to use checksums
53fef23ff81b73d6f7637cc888c49109f7d9f9325d9d7d26b2439478a5d335b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.5

Release files / gcomvkm-0.1.0-py3-none-any.whl

Download URL gcomvkm-0.1.0-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4f6f4e7726aa9e28168198c595e64f2c31a44383258b3909951941bf39fe68e
BLAKE2b-256 checksum
How to use checksums
5914cf670d10af3e0ef5d41f05876f3f527b2b0648ae7912bc24071bb06af435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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