smaller clusters (with three and four pointsare now labeled as noiseand only the cluster with five samples remains while dbscan doesn' require setting the number of clusters explicitlysetting eps implicitly controls how many clusters will be found finding good setting for eps is sometimes easier after scaling the data using standardscaler or minmaxscaleras using these scaling techniques will ensure that all features have similar ranges figure - shows the result of running dbscan on the two_moons dataset the algorithm actually finds the two half-circles and separates them using the default settingsin[ ]xy make_moons(n_samples= noise= random_state= rescale the data to zero mean and unit variance scaler standardscaler(scaler fit(xx_scaled scaler transform(xdbscan dbscan(clusters dbscan fit_predict(x_scaledplot the cluster assignments plt scatter(x_scaled[: ]x_scaled[: ] =clusterscmap=mglearn cm = plt xlabel("feature "plt ylabel("feature "as the algorithm produced the desired number of clusters (two)the parameter settings seem to work well if we decrease eps to (from the default of )we will get eight clusterswhich is clearly too many increasing eps to results in single cluster when using dbscanyou need to be careful about handling the returned cluster assignments the use of - to indicate noise might result in unexpected effects when using the cluster labels to index another array unsupervised learning and preprocessing