# Efficient algorithm to find the lowest value cluster in a series of values

Let's say I have a list of numeric values that tend to be grouped into some number of clusters of values that are close to one another.

I'm aware of things like k-means to group these into groups of similar values, but I'm curious as to whether there's a faster and perhaps simpler algorithm to simply find all the values in the first or lowest valued cluster.

Example: take this sequence:

9,8,22,45,46,41,20,19,7,10,11,20,21,24


There are three clusters: one near about 10, one near 20, and one near 42. The algorithm in question might return:

8,9,7,10,11


These values are part of the lowest valued cluster of grouped values. Whether the results are sorted or not doesn't matter.

I can think of some easy improvised ways but I'm wondering if there's a robust general solution.

• For a simple task like this, k-means should be good because robust and fast enough. Maybe DBSCAN can be faster? But it requires hyperparameters that are not so easy to determine, it depends on your knowledge over the data. May I ask why you want something faster? (need to perform it several times, on a large dataset, just curiosity?) Oct 31, 2019 at 22:15