Soft Clustering Python Package
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:
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.
Paper link: https://arxiv.org/abs/2607.19620
Citation:
@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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| soft_clustering-0.0.1.tar.gz | 48.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| soft_clustering-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 117.0 kB
Release files / soft_clustering-0.0.1.tar.gz
| Download URL | soft_clustering-0.0.1.tar.gz |
|---|---|
| Size | 48.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16e5aaa3cf9a8dd566b3f4c5b128d36628dd9088b0a23aa70745867dd11e965c
|
|
BLAKE2b-256 checksum How to use checksums |
7bb381e5967cc76777ef361af4cb84f76ad5037ddd85aad68f52e3fe803c6bc4
|
| 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.1-py2.py3-none-any.whl
| Download URL | soft_clustering-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 68.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
046944c43de4f5e3af8e5d2eed43aa0bccf5dd5cd012e5d8b36dfefe64d4071a
|
|
BLAKE2b-256 checksum How to use checksums |
512207392944e3810b95cff99bab4e20ac8808ec80862473a9d579f39e463efa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|