20
правок
Изменения
Ядро
,Нет описания правки
bandwidth = estimate_bandwidth(X, quantile='''0.2''', n_samples='''500''')
ms = MeanShift(bandwidth=bandwidth, bin_seeding='''True''')
ms.'''fit'''(X)
labels = ms.labels_
cluster_centers = ms.cluster_centers_
labels_unique = np.'''unique'''(labels)
n_clusters_ = '''len'''(labels_unique)
print("number of estimated clusters : %d" % n_clusters_)