right now I'm looking for an sklearn
method that does something like:
arr = [13,15,41,45,90,100]
print(KMeans.num_clusters(arr))
Outputs 3
You can use mean-shift clustering. It does not require number of clusters beforehand. However, the drawback of mean shift is that it is not very efficient compared to the k-means. Since your example array is only 1 dimensional it should not be a problem. If you are going to use mean-shift with 2 or more dimensional data, be careful with the curse of dimensionality.