

.. _example_cluster_plot_dbscan.py:


===================================
Demo of DBSCAN clustering algorithm
===================================

Finds core samples of high density and expands clusters from them.




.. image:: images/plot_dbscan_1.png
    :align: center


**Script output**::

  Estimated number of clusters: 3
  Homogeneity: 0.904
  Completeness: 0.773
  V-measure: 0.833
  Adjusted Rand Index: 0.869
  Adjusted Mutual Information: 0.772
  Silhouette Coefficient: 0.566



**Python source code:** :download:`plot_dbscan.py <plot_dbscan.py>`

.. literalinclude:: plot_dbscan.py
    :lines: 10-

**Total running time of the example:**    1 seconds
    