Preparing for system design interviews?  Try bugzed.com →

Optimal 1D k-means clustering

JSON →
library 0.5.0 ·python
verified Jun 30, 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 14
actors 5 distinct systems
last hit 19d ago AhrefsBot
GPTBot
4
Script
1
Amazonbot
1
ChatGPT-User
1
Humans
4

top countries 🇺🇸 United States · VN · 🇨🇦 Canada · TH · 🇹🇷 Turkey