Constrained clustering library for Python
Project description
Clustlib: Constrained Clustering Library
[!NOTE] 🚧 Currently the project is a Work in progress, but you can help us to fix it.
Please refer to our contributing documenation to know how can you start helping us
[!WARNING] This Library is a Work in progress at the moment, most use cases may not be contempleted or supported yet. If you find something feel free to create a bug report.
In the same way if you think we are missing something important create a feature request
What it is?
Clustlib is a Python library that provides a unified framework for constrained clustering algorithms.
Unlike traditional clustering, where groups are formed purely from data similarity, constrained clustering integrates prior knowledge in the form of must-link and cannot-link constraints.
This library includes implementations of both classic algorithms and state-of-the-art metaheuristics, enabling researchers and practitioners to experiment, compare, and extend methods in a common environment.
If you want to know more deep in our documentation
✨ Key Features
- Unified Python API across all algorithms
- Support for must-link and cannot-link constraints
- Scikit-learn inspired design for easy integration
- Implementations from different families:
- K-Means based methods
- Bayesian models
- Evolutionary and metaheuristic approaches
- Modular and extensible codebase
🚀 Installation
pip install clustlib
Basic Usage
from clustlib.kmeans import COPKMeans
constraints = np.zeros((X.shape[0], X.shape[0]))
# Example: COP-KMeans
model = COPKMeans(n_clusters=3, constraints=constraints)
model.fit(X)
labels = model.labels_
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clustlib-0.1.0.tar.gz.
File metadata
- Download URL: clustlib-0.1.0.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29e5e8fd98439d22818ed5f080f3518f6c187d2a838da8f475d9db1a2c36045
|
|
| MD5 |
6a2ac8d410f081df5b160c65a51b1cc1
|
|
| BLAKE2b-256 |
7de2d89e0e2f1b1486e112b5bc705751532844096afabda5e85f2e5e136b8b9b
|
Provenance
The following attestation bundles were made for clustlib-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on lordisma/pyCC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clustlib-0.1.0.tar.gz -
Subject digest:
f29e5e8fd98439d22818ed5f080f3518f6c187d2a838da8f475d9db1a2c36045 - Sigstore transparency entry: 412198364
- Sigstore integration time:
-
Permalink:
lordisma/pyCC@18e0d77675e28b47e07c8f92ae541750ab5eee50 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lordisma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@18e0d77675e28b47e07c8f92ae541750ab5eee50 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file clustlib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clustlib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a6f12386d7a48d03128a9ab67bf68071b3f14574ccbe1599cb4ea02a10cad7
|
|
| MD5 |
77fe3494ed653acae1b6f537d43e3f0e
|
|
| BLAKE2b-256 |
128275399678cde50a15daec4525e23658f1d9fce976c1bf88693091bed877ae
|
Provenance
The following attestation bundles were made for clustlib-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on lordisma/pyCC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clustlib-0.1.0-py3-none-any.whl -
Subject digest:
70a6f12386d7a48d03128a9ab67bf68071b3f14574ccbe1599cb4ea02a10cad7 - Sigstore transparency entry: 412198368
- Sigstore integration time:
-
Permalink:
lordisma/pyCC@18e0d77675e28b47e07c8f92ae541750ab5eee50 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lordisma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@18e0d77675e28b47e07c8f92ae541750ab5eee50 -
Trigger Event:
workflow_dispatch
-
Statement type: