Clusteval
Clusteval provides methods for unsupervised cluster validation
Install / Use
/learn @erdogant/ClustevalREADME
clusteval
<p align="center"> <a href="https://erdogant.github.io/clusteval"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/logo_large_2.png" width="300" /> </a> </p> <!---[](https://erdogant.github.io/donate/?currency=USD&amount=5)-->clusteval is a python package that is developed to evaluate detected clusters and return the cluster labels that have most optimal clustering tendency, Number of clusters and clustering quality. Multiple evaluation strategies are implemented for the evaluation; silhouette, dbindex, and derivative, and four clustering methods can be used: agglomerative, kmeans, dbscan and hdbscan.
| Feature | Description | Medium | Gumroad/Podcast | |--------|-------------|---|---| | A step-by-step guide for clustering images | Learn the basics of causal modelling. |link|---| | Creation of Hash image signatures |Detection of (Near) Identical Images Using Image Hash Functions. |link|---| | From Data to Clusters | The step to go from raw data to reliable clusters. |link|---| | From Clusters To Insights. | The step from clusters to valuable insights. |link|---|
Documentation
Full documentation is available at erdogant.github.io/clusteval, including examples and API references.
Installation
It is advisable to use a virtual environment:
conda create -n env_clusteval python=3.12
conda activate env_clusteval
Install via PyPI:
pip install clusteval
To upgrade to the latest version:
pip install --upgrade clusteval
Import the library:
from clusteval import clusteval
Examples
A structured overview is available in the documentation.
<table> <tr> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#cluster-evaluation"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig1b_sil.png" width="300"/> <br>Silhouette Score </a> </td> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Plots.html#plot"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig1a_sil.png" width="300"/> <br>Optimal Clusters </a> </td> </tr> <tr> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Plots.html#dendrogram"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/dendrogram.png" width="300"/> <br>Dendrogram </a> </td> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#dbindex-method"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig2_dbindex.png" width="300"/> <br>Davies-Bouldin Index </a> </td> </tr> <tr> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#derivative-method"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig3_der.png" width="300"/> <br>Derivative Method </a> </td> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#dbscan"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig5_dbscan.png" width="300"/> <br>DBSCAN </a> </td> </tr> <tr> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#hdbscan"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig4a_hdbscan.png" width="300"/> <br>HDBSCAN A </a> </td> <td align="center"> <a href="https://erdogant.github.io/clusteval/pages/html/Examples.html#hdbscan"> <img src="https://github.com/erdogant/clusteval/blob/master/docs/figs/fig4b_hdbscan.png" width="300"/> <br>HDBSCAN B </a> </td> </tr> </table>Citation
Please cite clusteval in your publications if it has been helpful in your research. Citation information is available at the top right of the GitHub page.
Related Tools & Blogs
- Use ARI when clustering contains large equal-sized clusters
- Use AMI for unbalanced clusters with small components
- Adjusted Rand Score — scikit-learn
- Adjusted for Chance Measures — scikit-learn
- imagededup GitHub repo
- Clustering images by visual similarity
- Facebook DeepCluster
- PCA on Hyperspectral Data
- Face Recognition with PCA
Star history
Contributors
Thank the contributors!
<p align="left"> <a href="https://github.com/erdogant/clusteval/graphs/contributors"> <img src="https://contrib.rocks/image?repo=erdogant/clusteval" /> </a> </p>Maintainer
- Erdogan Taskesen, github: erdogant
- Contributions are welcome.
- Yes! This library is entirely free but it runs on coffee! :) Feel free to support with a <a href="https://erdogant.github.io/donate/?currency=USD&amount=5">Coffee</a>.
Related Skills
claude-opus-4-5-migration
110.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
350.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
51.0k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.8kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
