def makeMeanShift(X, k=-1): # estimate bandwidth for mean shift bandwidth = cluster.estimate_bandwidth(X, quantile=0.3) return cluster.MeanShift(bandwidth=bandwidth, bin_seeding=True)