.. _sphx_glr_auto_examples_01_clustering: Clustering algorithms and validation ------------------------------------ Hard and fuzzy partitioning (k-means, k-medoids, FCM, GK, GG), evaluating new data, choosing the number of clusters and working with pandas / scikit-learn. Also: generalized fuzzifiers and deterministic annealing, subtractive and mountain clustering, compatible cluster merging and stability-based selection of the number of clusters. .. raw:: html
.. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_01_fcm_basics_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_01_fcm_basics` .. raw:: html
Fuzzy c-means: memberships and the fuzziness exponent
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_02_hard_vs_fuzzy_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_02_hard_vs_fuzzy` .. raw:: html
Hard versus fuzzy partitions: k-means, k-medoids, and FCM
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_03_gk_ellipses_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_03_gk_ellipses` .. raw:: html
Gustafson–Kessel: clusters with their own shape
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_04_gg_densities_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_04_gg_densities` .. raw:: html
Gath–Geva: clusters of different size and density
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_05_validity_scan_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_05_validity_scan` .. raw:: html
Choosing the number of clusters with validity indices
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_06_predict_new_data_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_06_predict_new_data` .. raw:: html
Applying a fitted model to new data
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_07_motorcycle_scaling_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_07_motorcycle_scaling` .. raw:: html
Feature scaling on real data: the motorcycle data set
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_08_sklearn_pandas_workflow_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_08_sklearn_pandas_workflow` .. raw:: html
Working with pandas and scikit-learn: pipelines, DataFrames, and model selection
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_09_fuzziness_exponent_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_09_fuzziness_exponent` .. raw:: html
The fuzziness exponent m: from crisp cells to uniform memberships
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_10_initialisation_restarts_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_10_initialisation_restarts` .. raw:: html
Local optima and restarts: initializing Gustafson--Kessel on crossing lines
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_11_distance_norms_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_11_distance_norms` .. raw:: html
Distance norms: Euclidean, diagonal, and Mahalanobis fuzzy c-means
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_12_fuzzifiers_annealing_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_12_fuzzifiers_annealing` .. raw:: html
What makes a partition fuzzy: fuzzifiers, regularization, and annealing
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_13_subtractive_clustering_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_13_subtractive_clustering` .. raw:: html
Subtractive clustering: the number and location of clusters from density
.. raw:: html
.. only:: html .. image:: /auto_examples/01_clustering/images/thumb/sphx_glr_plot_14_merging_stability_thumb.png :alt: :doc:`/auto_examples/01_clustering/plot_14_merging_stability` .. raw:: html
Three routes to the number of clusters: merging, validity scan, and stability
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /auto_examples/01_clustering/plot_01_fcm_basics /auto_examples/01_clustering/plot_02_hard_vs_fuzzy /auto_examples/01_clustering/plot_03_gk_ellipses /auto_examples/01_clustering/plot_04_gg_densities /auto_examples/01_clustering/plot_05_validity_scan /auto_examples/01_clustering/plot_06_predict_new_data /auto_examples/01_clustering/plot_07_motorcycle_scaling /auto_examples/01_clustering/plot_08_sklearn_pandas_workflow /auto_examples/01_clustering/plot_09_fuzziness_exponent /auto_examples/01_clustering/plot_10_initialisation_restarts /auto_examples/01_clustering/plot_11_distance_norms /auto_examples/01_clustering/plot_12_fuzzifiers_annealing /auto_examples/01_clustering/plot_13_subtractive_clustering /auto_examples/01_clustering/plot_14_merging_stability