SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.06856 · NeurIPS · 2020

BanditPAM: Almost Linear Time k-Medoids Clustering via Multi-Armed Bandits

Mo Tiwari, Martin Zhang, Harvard Chan, James Mayclin, Sebastian Thrun, Chris Piech, Ilan Shomorony

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 0 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
motiwari/BanditPAM-python — 0 of 5
FunctionStatusWhere it lives
UCB_build Not yet run motiwari/BanditPAM-python/ucb_pam.py
pointer only (licence: NONE) · get_code("332de0baba3a0594")
UCB_build_and_swap Not yet run motiwari/BanditPAM-python/ucb_pam.py
pointer only (licence: NONE) · get_code("c7b82945e4ef5b42")
UCB_swap Not yet run motiwari/BanditPAM-python/ucb_pam.py
pointer only (licence: NONE) · get_code("0b0d49162b63c665")
build_sample_for_targets Not yet run motiwari/BanditPAM-python/ucb_pam.py
pointer only (licence: NONE) · get_code("e5b646c0a4cfe518")
swap_sample_for_targets Not yet run motiwari/BanditPAM-python/ucb_pam.py
pointer only (licence: NONE) · get_code("6cf8d27c3d97df4e")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Clustering is a ubiquitous task in data science. Compared to the commonly used k-means clustering, k-medoids clustering requires the cluster centers to be actual data points and supports arbitrary distance metrics, which permits greater interpretability and the clustering of structured objects. Current state-of-the-art k-medoids clustering algorithms, such as Partitioning Around Medoids (PAM), are iterative and are quadratic in the dataset size n for each iteration, being prohibitively expensive for large datasets. We propose BanditPAM, a randomized algorithm inspired by techniques from multi-armed bandits, that reduces the complexity of each PAM iteration from O(n 2 ) to O(n log n) and returns the same results with high probability, under assumptions on the data that often hold in practice. As such, BanditPAM matches state-of-the-art clustering loss while reaching solutions much faster. We empirically validate our results on several large real-world datasets, including a coding exercise submissions dataset from Code.org, the 10x Genomics 68k PBMC single-cell RNA sequencing dataset, and the MNIST handwritten digits dataset. In these experiments, we observe that BanditPAM returns the same results as state-of-the-art PAM-like algorithms up to 4x faster while performing up to 200x fewer distance computations. The improvements demonstrated by BanditPAM enable k-medoids clustering on a wide range of applications, including identifying cell types in large-scale single-cell data and providing scalable feedback for students learning computer science online. We also release highly optimized Python and C++ implementations of our algorithm 1 .

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2006.06856")
get_code_for_paper("2006.06856")
have("2006.06856")

Connect an agent — have() is free.