Why do I get different outputs from line
print ms.fit_predict(val), p_all[idx]
The outputs from ms.fit_predict(val) are all 0.
import numpy as np
from sklearn.cluster import MeanShift, estimate_bandwidth
X = 100*np.random.random_sample((500,15))-100
X = np.array(X, dtype=np.float)
bandwidth = estimate_bandwidth(X, quantile=0.01)
ms = MeanShift(bandwidth=bandwidth, bin_seeding=True)
ms.fit(X)
p_all = ms.fit_predict(X)
for idx, val in enumerate(X):
print val
print X[idx]
print ms.fit_predict(val), p_all[idx]