Optimal 1D k-means clustering

JSON →
library 0.5.0 ·python
verified May 24, 2026

kmeans1d is a Python package providing an implementation of optimal k-means clustering specifically for one-dimensional data. It utilizes an O(kn + n log n) dynamic programming algorithm, based on research by Xiaolin (1991) and Gronlund et al. (2017), to find globally optimal k clusters. The core logic is written in C++ for performance and wrapped for Python usage. The library is actively maintained, with its current version being 0.5.0.

total hits 13
actors 6 distinct systems
last hit 1d ago MetaBot
MetaBot
4
GPTBot
2
Script
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada