Skip to main content
https://raw.githubusercontent.com/soft-clustering/soft-clustering/refs/heads/main/SCPP_Poster.png

Soft Clustering is a comprehensive Python library for soft and fuzzy clustering algorithms. It provides a wide range of state-of-the-art methods for membership-based, possibilistic, evidential, graph, document, and deep clustering models.

This package is designed to support research and applied workflows involving clustering under uncertainty, overlapping memberships, and soft assignments.

Official documentation is available at:

https://soft-clustering.readthedocs.io/en/latest/index.html

Features

  • Fuzzy clustering: FCM, PCM, GK, SCM, SISC, KFCM, PFCM, CAFCM, and related variants

  • Probabilistic and mixture models: GMM, LDA, PLSI, MBMM, MMSB, BGMM

  • Rough and possibilistic clustering: RoughKMeans, WBSC, NOCD, DMon, RDFKC

  • Nonnegative matrix factorization and graph clustering: BayesianNMF, BIGCLAM, CDCgS, SoftDBSCANGM

  • Document and graph clustering methods: KMART, SCSPA and additional soft clustering algorithms

Installation

The complete package, including deep learning-based algorithms, can be installed from PyPI using:

pip install soft-clustering[deep]

For users who only need the core algorithms (without deep learning dependencies), install the base version:

pip install soft-clustering

Quick Start

Basic usage with the package API:

import numpy as np
from soft_clustering import FCM

X = np.array([[1.0, 2.0], [1.1, 2.1], [8.0, 8.1], [8.2, 7.9]])
model = FCM(m=2.0, max_iter=150, tol=1e-5)
memberships = model.fit_predict(X, K=2)
centers = model.centers_

print("Soft membership shape:", memberships.shape)
print("Cluster centers:", centers)

Documentation

Full API reference, examples, algorithm descriptions, and usage guides are available in the official documentation:

https://soft-clustering.readthedocs.io/en/latest/index.html

Testing

The project includes a comprehensive test suite in the tests/ directory, covering all implemented algorithms.

To run the tests:

pip install -e ".[deep,dev]"   # Install in development mode
pytest

See tests/HOW_TO_RUN.txt for more details.

Research & Citation

This package is part of an academic research project submitted to the JMLR MLOSS journal. A publication is forthcoming.

@misc{rezaee2026scppunifiedpythonlibrary,
   title={SCPP: A Unified Python Library for Soft Clustering},
   author={Kiyan Rezaee and Morteza Ziabakhsh and Artin Bahrampour and Seyed Mohammad Ghoreishi and Asal Khaje and Ali Sajedifar and Manny Chalak and Ava Zerafatangiz and Sadegh Eskandari},
   year={2026},
   eprint={2607.19620},
   archivePrefix={arXiv},
   primaryClass={cs.LG},
   url={https://arxiv.org/abs/2607.19620},
}

Contributing

Contributions, bug reports, and feature requests are welcome. Please open issues or pull requests on the repository.

Please see our:

License

Distributed under the terms of the MIT license.

Metadata

Release files for soft-clustering 0.0.3

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

Source distribution (sdist)

Source distribution for soft-clustering 0.0.3
File Size Uploaded
soft_clustering-0.0.3.tar.gz 48.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for soft-clustering 0.0.3
File Interpreter ABI Platform
soft_clustering-0.0.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 117.0 kB

Release files / soft_clustering-0.0.3.tar.gz

Download URL soft_clustering-0.0.3.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
26742e4bce46894c2b77a70c408650191f9c05c30cea88e3575e77c9e3d78f24
BLAKE2b-256 checksum
How to use checksums
8e45a9f26b3c8c2c80b4ed312298b5caf1a3d7411bd804bc6aa3bda48f72f38e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / soft_clustering-0.0.3-py2.py3-none-any.whl

Download URL soft_clustering-0.0.3-py2.py3-none-any.whl
Size 68.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
40d403f5457585e582d0b732f29cc3a7e2603f63cca632710621846bea478fb7
BLAKE2b-256 checksum
How to use checksums
43a36b8dcaea44a7e0b01916a5da5bd36176f4986fab2622869da934ba1db069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

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