.. _sphx_glr_auto_examples_cluster:
.. _cluster_examples:
Clustering
----------
Examples concerning the :mod:`sklearn.cluster` module.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_digits_thumb.png
:alt: A demo of K-Means clustering on the handwritten digits data
:ref:`sphx_glr_auto_examples_cluster_plot_kmeans_digits.py`
.. raw:: html
A demo of K-Means clustering on the handwritten digits data
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_coin_ward_segmentation_thumb.png
:alt: A demo of structured Ward hierarchical clustering on an image of coins
:ref:`sphx_glr_auto_examples_cluster_plot_coin_ward_segmentation.py`
.. raw:: html
A demo of structured Ward hierarchical clustering on an image of coins
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_mean_shift_thumb.png
:alt: A demo of the mean-shift clustering algorithm
:ref:`sphx_glr_auto_examples_cluster_plot_mean_shift.py`
.. raw:: html
A demo of the mean-shift clustering algorithm
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_adjusted_for_chance_measures_thumb.png
:alt: Adjustment for chance in clustering performance evaluation
:ref:`sphx_glr_auto_examples_cluster_plot_adjusted_for_chance_measures.py`
.. raw:: html
Adjustment for chance in clustering performance evaluation
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_clustering_thumb.png
:alt: Agglomerative clustering with and without structure
:ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_clustering.py`
.. raw:: html
Agglomerative clustering with and without structure
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_clustering_metrics_thumb.png
:alt: Agglomerative clustering with different metrics
:ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_clustering_metrics.py`
.. raw:: html
Agglomerative clustering with different metrics
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_plusplus_thumb.png
:alt: An example of K-Means++ initialization
:ref:`sphx_glr_auto_examples_cluster_plot_kmeans_plusplus.py`
.. raw:: html
An example of K-Means++ initialization
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_bisect_kmeans_thumb.png
:alt: Bisecting K-Means and Regular K-Means Performance Comparison
:ref:`sphx_glr_auto_examples_cluster_plot_bisect_kmeans.py`
.. raw:: html
Bisecting K-Means and Regular K-Means Performance Comparison
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_color_quantization_thumb.png
:alt: Color Quantization using K-Means
:ref:`sphx_glr_auto_examples_cluster_plot_color_quantization.py`
.. raw:: html
Color Quantization using K-Means
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_birch_vs_minibatchkmeans_thumb.png
:alt: Compare BIRCH and MiniBatchKMeans
:ref:`sphx_glr_auto_examples_cluster_plot_birch_vs_minibatchkmeans.py`
.. raw:: html
Compare BIRCH and MiniBatchKMeans
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_cluster_comparison_thumb.png
:alt: Comparing different clustering algorithms on toy datasets
:ref:`sphx_glr_auto_examples_cluster_plot_cluster_comparison.py`
.. raw:: html
Comparing different clustering algorithms on toy datasets
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_linkage_comparison_thumb.png
:alt: Comparing different hierarchical linkage methods on toy datasets
:ref:`sphx_glr_auto_examples_cluster_plot_linkage_comparison.py`
.. raw:: html
Comparing different hierarchical linkage methods on toy datasets
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_mini_batch_kmeans_thumb.png
:alt: Comparison of the K-Means and MiniBatchKMeans clustering algorithms
:ref:`sphx_glr_auto_examples_cluster_plot_mini_batch_kmeans.py`
.. raw:: html
Comparison of the K-Means and MiniBatchKMeans clustering algorithms
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_dbscan_thumb.png
:alt: Demo of DBSCAN clustering algorithm
:ref:`sphx_glr_auto_examples_cluster_plot_dbscan.py`
.. raw:: html
Demo of DBSCAN clustering algorithm
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_optics_thumb.png
:alt: Demo of OPTICS clustering algorithm
:ref:`sphx_glr_auto_examples_cluster_plot_optics.py`
.. raw:: html
Demo of OPTICS clustering algorithm
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_affinity_propagation_thumb.png
:alt: Demo of affinity propagation clustering algorithm
:ref:`sphx_glr_auto_examples_cluster_plot_affinity_propagation.py`
.. raw:: html
Demo of affinity propagation clustering algorithm
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_assumptions_thumb.png
:alt: Demonstration of k-means assumptions
:ref:`sphx_glr_auto_examples_cluster_plot_kmeans_assumptions.py`
.. raw:: html
Demonstration of k-means assumptions
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_stability_low_dim_dense_thumb.png
:alt: Empirical evaluation of the impact of k-means initialization
:ref:`sphx_glr_auto_examples_cluster_plot_kmeans_stability_low_dim_dense.py`
.. raw:: html
Empirical evaluation of the impact of k-means initialization
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_digits_agglomeration_thumb.png
:alt: Feature agglomeration
:ref:`sphx_glr_auto_examples_cluster_plot_digits_agglomeration.py`
.. raw:: html
Feature agglomeration
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_feature_agglomeration_vs_univariate_selection_thumb.png
:alt: Feature agglomeration vs. univariate selection
:ref:`sphx_glr_auto_examples_cluster_plot_feature_agglomeration_vs_univariate_selection.py`
.. raw:: html
Feature agglomeration vs. univariate selection
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_ward_structured_vs_unstructured_thumb.png
:alt: Hierarchical clustering: structured vs unstructured ward
:ref:`sphx_glr_auto_examples_cluster_plot_ward_structured_vs_unstructured.py`
.. raw:: html
Hierarchical clustering: structured vs unstructured ward
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_inductive_clustering_thumb.png
:alt: Inductive Clustering
:ref:`sphx_glr_auto_examples_cluster_plot_inductive_clustering.py`
.. raw:: html
Inductive Clustering
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_cluster_iris_thumb.png
:alt: K-means Clustering
:ref:`sphx_glr_auto_examples_cluster_plot_cluster_iris.py`
.. raw:: html
K-means Clustering
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_dict_face_patches_thumb.png
:alt: Online learning of a dictionary of parts of faces
:ref:`sphx_glr_auto_examples_cluster_plot_dict_face_patches.py`
.. raw:: html
Online learning of a dictionary of parts of faces
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_dendrogram_thumb.png
:alt: Plot Hierarchical Clustering Dendrogram
:ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_dendrogram.py`
.. raw:: html
Plot Hierarchical Clustering Dendrogram
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_coin_segmentation_thumb.png
:alt: Segmenting the picture of greek coins in regions
:ref:`sphx_glr_auto_examples_cluster_plot_coin_segmentation.py`
.. raw:: html
Segmenting the picture of greek coins in regions
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_silhouette_analysis_thumb.png
:alt: Selecting the number of clusters with silhouette analysis on KMeans clustering
:ref:`sphx_glr_auto_examples_cluster_plot_kmeans_silhouette_analysis.py`
.. raw:: html
Selecting the number of clusters with silhouette analysis on KMeans clustering
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_segmentation_toy_thumb.png
:alt: Spectral clustering for image segmentation
:ref:`sphx_glr_auto_examples_cluster_plot_segmentation_toy.py`
.. raw:: html
Spectral clustering for image segmentation
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_digits_linkage_thumb.png
:alt: Various Agglomerative Clustering on a 2D embedding of digits
:ref:`sphx_glr_auto_examples_cluster_plot_digits_linkage.py`
.. raw:: html
Various Agglomerative Clustering on a 2D embedding of digits
.. raw:: html
.. only:: html
.. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_face_compress_thumb.png
:alt: Vector Quantization Example
:ref:`sphx_glr_auto_examples_cluster_plot_face_compress.py`
.. raw:: html
Vector Quantization Example
.. raw:: html
.. toctree::
:hidden:
/auto_examples/cluster/plot_kmeans_digits
/auto_examples/cluster/plot_coin_ward_segmentation
/auto_examples/cluster/plot_mean_shift
/auto_examples/cluster/plot_adjusted_for_chance_measures
/auto_examples/cluster/plot_agglomerative_clustering
/auto_examples/cluster/plot_agglomerative_clustering_metrics
/auto_examples/cluster/plot_kmeans_plusplus
/auto_examples/cluster/plot_bisect_kmeans
/auto_examples/cluster/plot_color_quantization
/auto_examples/cluster/plot_birch_vs_minibatchkmeans
/auto_examples/cluster/plot_cluster_comparison
/auto_examples/cluster/plot_linkage_comparison
/auto_examples/cluster/plot_mini_batch_kmeans
/auto_examples/cluster/plot_dbscan
/auto_examples/cluster/plot_optics
/auto_examples/cluster/plot_affinity_propagation
/auto_examples/cluster/plot_kmeans_assumptions
/auto_examples/cluster/plot_kmeans_stability_low_dim_dense
/auto_examples/cluster/plot_digits_agglomeration
/auto_examples/cluster/plot_feature_agglomeration_vs_univariate_selection
/auto_examples/cluster/plot_ward_structured_vs_unstructured
/auto_examples/cluster/plot_inductive_clustering
/auto_examples/cluster/plot_cluster_iris
/auto_examples/cluster/plot_dict_face_patches
/auto_examples/cluster/plot_agglomerative_dendrogram
/auto_examples/cluster/plot_coin_segmentation
/auto_examples/cluster/plot_kmeans_silhouette_analysis
/auto_examples/cluster/plot_segmentation_toy
/auto_examples/cluster/plot_digits_linkage
/auto_examples/cluster/plot_face_compress