emeans: E-Means Clustering, a Fast Mini-Batch Alternative to K-Means
Source:R/emeans-package.R
emeans-package.RdFits e-means, a mini-batch alternative to k-means whose centroids follow exponential moving averages of the batches they see, and which its authors report reaches a lower loss than Lloyd's algorithm in about a tenth of the passes over the data; see Bessa et al. (2026) doi:10.48550/arXiv.2611.09501 . Fits carry the same cluster labels, centers and sums of squares as kmeans() and work with predict(), the 'generics' verbs tidy(), glance() and augment() and the 'tidyclust' k_means() engine, while data too large for memory can be streamed one batch at a time. The 'C++' kernels use 'Rcpp' and 'RcppArmadillo', and optional graphics processing unit (GPU) support comes through 'torch'. The algorithm is ported from the e-means implementation in the 'faiss' library https://github.com/facebookresearch/faiss.
Author
Maintainer: James Joseph Balamuta balamut2@illinois.edu (ORCID) [copyright holder]
Authors:
James Joseph Balamuta balamut2@illinois.edu (ORCID) [copyright holder]
Other contributors:
Gergely Szilvasy (Wrote the faiss Python code this package is ported from; not involved in this package) [contributor]
Swann Bessa (Wrote the faiss Python code this package is ported from; not involved in this package) [contributor]
Matthijs Douze (Wrote the faiss Python code this package is ported from; not involved in this package) [contributor]
Meta Platforms, Inc. and affiliates [copyright holder]