April 2018
Beginner to intermediate
282 pages
6h 52m
English
DBSCAN is one of the clustering algorithms that can deal with non-flat geometry and uneven cluster sizes. Let's see what it can do:
from sklearn.cluster import DBSCANestimators = [{'estimator': DBSCAN, 'args':(), 'kwargs':{'eps': 0.5}}]unsupervised_learner = Unsupervised_AutoML(estimators)predictions, performance_metrics = unsupervised_learner.fit_predict(X, y)
Metrics in the console are as follows:
################## DBSCAN metrics ##################### Silhouette Coefficient: 0.231 Estimated number of clusters: 12.000 Homogeneity: 0.794 Completeness: 0.800 V-measure: 0.797 Adjusted Rand Index: 0.737 Adjusted Mutual Information: 0.792
DBSCAN clusters are plotted as follows:
plot_kwargs = {'s': 12, 'linewidths': ...