Content area

Abstract

Clustering is a key task in machine learning, with \(k\)-means being widely used for its simplicity and effectiveness. While 1D clustering is common, existing methods often fail to exploit the structure of 1D data, leading to inefficiencies. This thesis introduces optimized algorithms for \(k\)-means++ initialization and Lloyd's algorithm, leveraging sorted data, prefix sums, and binary search for improved computational performance. The main contributions are: (1) an optimized \(k\)-cluster algorithm achieving \(O(l \cdot k^2 \cdot \log n)\) complexity for greedy \(k\)-means++ initialization and \(O(i \cdot k \cdot \log n)\) for Lloyd's algorithm, where \(l\) is the number of greedy \(k\)-means++ local trials, and \(i\) is the number of Lloyd's algorithm iterations, and (2) a binary search-based two-cluster algorithm, achieving \(O(\log n)\) runtime with deterministic convergence to a Lloyd's algorithm local minimum. Benchmarks demonstrate over a 4500x speedup compared to scikit-learn for large datasets while maintaining clustering quality measured by within-cluster sum of squares (WCSS). Additionally, the algorithms achieve a 300x speedup in an LLM quantization task, highlighting their utility in emerging applications. This thesis bridges theory and practice for 1D \(k\)-means clustering, delivering efficient and sound algorithms implemented in a JIT-optimized open-source Python library.

Details

1009240
Title
Log-Time K-Means Clustering for 1D Data: Novel Approaches with Proof and Implementation
Author
Publication title
arXiv.org; Ithaca
Publication year
2024
Publication date
Dec 24, 2024
Section
Computer Science
Publisher
Cornell University Library, arXiv.org
Source
arXiv.org
Place of publication
Ithaca
Country of publication
United States
University/institution
Cornell University Library arXiv.org
e-ISSN
2331-8422
Source type
Working Paper
Language of publication
English
Document type
Working Paper
Publication history
 
 
Online publication date
2024-12-25
Milestone dates
2024-12-19 (Submission v1); 2024-12-24 (Submission v2)
Publication history
 
 
   First posting date
25 Dec 2024
ProQuest document ID
3148682104
Document URL
https://www.proquest.com/working-papers/log-time-k-means-clustering-1d-data-novel/docview/3148682104/se-2?accountid=208611
Full text outside of ProQuest
Copyright
© 2024. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2024-12-26
Database
2 databases
  • ProQuest One Academic
  • ProQuest One Academic