Untitled
from sklearn.cluster import MeanShift, estimate_bandwidth bandwidth = estimate_bandwidth(embeddings, quantile=0.2) ms = MeanShift(bandwidth=bandwidth, bin_seeding=True) cluster_labels = ms.fit_predict(embeddings)
Leave a Comment
from sklearn.cluster import MeanShift, estimate_bandwidth bandwidth = estimate_bandwidth(embeddings, quantile=0.2) ms = MeanShift(bandwidth=bandwidth, bin_seeding=True) cluster_labels = ms.fit_predict(embeddings)