Skip to main content

Multi-Center Minimum Spanning Tree Clustering algorithm

Project description

PyPI version License: MIT Python 3.7+

Motivation

MCMSTClustering is an MST-based clustering algorithm designed to handle high-dimensional, imbalanced, varying-density, and arbitrary-shaped datasets. It first forms micro-clusters using KD-Tree range search, then builds a Minimum Spanning Tree over these micro-clusters to detect non-spherical macro-clusters. A final cluster-regulation step refines boundaries and improves clustering quality. Experiments show that MCMSTClustering outperforms several state-of-the-art methods with strong accuracy and efficient runtime.

Installation

pip install mcmst-clust

Usage

from mcmst_clust import MCMSTClustering
from sklearn.datasets import load_wine
from sklearn.metrics import adjusted_rand_score

data = load_wine()
X = data.data
y = data.target

model = MCMSTClustering(N=19, r=0.49, n_micro=3, random_state=42) 
labels = model.fit_predict(X)

print("n_micro:", model.n_micro_clusters_, "n_macro:", model.n_macro_clusters_)
print("ARI:", adjusted_rand_score(y, labels))

Oerview

MCMSTClustering (Defining Non-Spherical Clusters by using Minimum Spanning Tree over KD-Tree-based Micro-Clusters) is designed to overcome limitations of conventional clustering algorithms when handling:

- High-dimensional data

- Imbalanced datasets

- Clusters with varying densities

- Noisy data/outliers

- Arbitrary-shaped clusters

The algorithm consists of three main steps:

1. Micro-cluster Formation: Defines micro-clusters using a KD-Tree data structure with range search.

2. Macro-cluster Construction: Builds a minimum spanning tree (MST) over the micro-clusters to form macro-clusters.

3. Cluster Regulation: Refines the clusters to improve accuracy and overall clustering quality.

Extensive experiments against state-of-the-art algorithms show that MCMSTClustering achieves high-quality clustering results with acceptable runtime.

Key Features

- Clusters datasets with high quality

- Detects arbitrary-shaped clusters

- Robust against outliers/noisy data

- Handles clusters with varying densities

- Efficient on imbalanced datasets

Cite

If you use the code in your works, please cite the paper given below:

Şenol, A. MCMSTClustering: defining non-spherical clusters by using minimum 
spanning tree over KD-tree-based micro-clusters. Neural Comput & Applic 35, 
13239–13259 (2023). https://doi.org/10.1007/s00521-023-08386-3

BibTeX

@article{csenol2023mcmstclustering,
  title={MCMSTClustering: defining non-spherical clusters by using minimum spanning tree over KD-tree-based micro-clusters},
  author={{\c{S}}enol, Ali},
  journal={Neural Computing and Applications},
  volume={35},
  number={18},
  pages={13239--13259},
  year={2023},
  publisher={Springer}
}

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

mcmst_clust-1.0.8.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

mcmst_clust-1.0.8-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file mcmst_clust-1.0.8.tar.gz.

File metadata

  • Download URL: mcmst_clust-1.0.8.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcmst_clust-1.0.8.tar.gz
Algorithm Hash digest
SHA256 2092239a82ba0e7a089a1fc83cfe5c6dcb4a1959764359730f8089d7bdd713c0
MD5 96ea7faa5b2394e2da7e2c9137d47863
BLAKE2b-256 b958412269d1c2d7e2ac7f7ef4cf7cdb4192f72a7da47b3e51d014bd5527d811

See more details on using hashes here.

File details

Details for the file mcmst_clust-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: mcmst_clust-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mcmst_clust-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5579e9df983afe6360f94a9943dbd1f90e6d12bf72910e1008fd6861e8700a
MD5 2256d2239d1198516dce09ed27c0bcba
BLAKE2b-256 5941b99d32196d030464d004186eca53dcd1b9e16db1c7893a325ce581712de9

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