I have some data like the fig below. I want to run a clustering algorithm that finds out the best number of clusters by itself, is there something like this?
I looked at k-mean clustering but it wants the number of cluster as an input argument as I shown in below code:
X_filtered = np.vstack((X[y == 0][:500], X[y == 1][:100], X[y == 2][:10]))
y_pred = KMeans(n_clusters=3,
random_state=random_state).fit_predict(X_filtered)
I want that algorithm to predict the best number of the cluster and then cluster the data.
I really appreciate any help you can provide.