:orphan:

.. _general_examples:

Examples
========



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    </div>


Release Highlights
------------------

These examples illustrate the main features of the releases of scikit-learn.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 1.2! Many bug fixes and improvements wer...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_1_2_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_2_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.2</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 1.1! Many bug fixes and improvements wer...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_1_1_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_1_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.1</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are very pleased to announce the release of scikit-learn 1.0! The library has been stable fo...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_1_0_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_0_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.0</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.24! Many bug fixes and improvements we...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_0_24_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_0_24_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.24</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.23! Many bug fixes and improvements we...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_0_23_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_0_23_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.23</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.22, which comes with many bug fixes an...">

.. only:: html

  .. image:: /auto_examples/release_highlights/images/thumb/sphx_glr_plot_release_highlights_0_22_0_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_0_22_0.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.22</div>
    </div>


.. raw:: html

    </div>


Biclustering
------------

Examples concerning the :mod:`sklearn.cluster.bicluster` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a checkerboard dataset and bicluster it using the Spe...">

.. only:: html

  .. image:: /auto_examples/bicluster/images/thumb/sphx_glr_plot_spectral_biclustering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_bicluster_plot_spectral_biclustering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">A demo of the Spectral Biclustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a dataset and bicluster it using the Spectral Co-Clus...">

.. only:: html

  .. image:: /auto_examples/bicluster/images/thumb/sphx_glr_plot_spectral_coclustering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_bicluster_plot_spectral_coclustering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">A demo of the Spectral Co-Clustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the Spectral Co-clustering algorithm on the twenty newsgroups dataset...">

.. only:: html

  .. image:: /auto_examples/bicluster/images/thumb/sphx_glr_plot_bicluster_newsgroups_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_bicluster_plot_bicluster_newsgroups.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Biclustering documents with the Spectral Co-clustering algorithm</div>
    </div>


.. raw:: html

    </div>


Calibration
-----------------------

Examples illustrating the calibration of predicted probabilities of classifiers.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Well calibrated classifiers are probabilistic classifiers for which the output of predict_proba...">

.. only:: html

  .. image:: /auto_examples/calibration/images/thumb/sphx_glr_plot_compare_calibration_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_calibration_plot_compare_calibration.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of Calibration of Classifiers</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="When performing classification one often wants to predict not only the class label, but also th...">

.. only:: html

  .. image:: /auto_examples/calibration/images/thumb/sphx_glr_plot_calibration_curve_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_calibration_plot_calibration_curve.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Probability Calibration curves</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class ...">

.. only:: html

  .. image:: /auto_examples/calibration/images/thumb/sphx_glr_plot_calibration_multiclass_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_calibration_plot_calibration_multiclass.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Probability Calibration for 3-class classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="When performing classification you often want to predict not only the class label, but also the...">

.. only:: html

  .. image:: /auto_examples/calibration/images/thumb/sphx_glr_plot_calibration_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_calibration_plot_calibration.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Probability calibration of classifiers</div>
    </div>


.. raw:: html

    </div>


Classification
-----------------------

General examples about classification algorithms.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A comparison of a several classifiers in scikit-learn on synthetic datasets. The point of this ...">

.. only:: html

  .. image:: /auto_examples/classification/images/thumb/sphx_glr_plot_classifier_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_classification_plot_classifier_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Classifier comparison</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example plots the covariance ellipsoids of each class and decision boundary learned by LDA...">

.. only:: html

  .. image:: /auto_examples/classification/images/thumb/sphx_glr_plot_lda_qda_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_classification_plot_lda_qda.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Linear and Quadratic Discriminant Analysis with covariance ellipsoid</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how the Ledoit-Wolf and Oracle Shrinkage Approximating (OAS) estimator...">

.. only:: html

  .. image:: /auto_examples/classification/images/thumb/sphx_glr_plot_lda_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_classification_plot_lda.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the classification probability for different classifiers. We use a 3 class dataset, and we...">

.. only:: html

  .. image:: /auto_examples/classification/images/thumb/sphx_glr_plot_classification_probability_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_classification_plot_classification_probability.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot classification probability</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how scikit-learn can be used to recognize images of hand-written digits, fro...">

.. only:: html

  .. image:: /auto_examples/classification/images/thumb/sphx_glr_plot_digits_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_classification_plot_digits_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Recognizing hand-written digits</div>
    </div>


.. raw:: html

    </div>


Clustering
----------

Examples concerning the :mod:`sklearn.cluster` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example we compare the various initialization strategies for K-means in terms of runtim...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_kmeans_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">A demo of K-Means clustering on the handwritten digits data</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Compute the segmentation of a 2D image with Ward hierarchical clustering. The clustering is spa...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_coin_ward_segmentation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_coin_ward_segmentation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">A demo of structured Ward hierarchical clustering on an image of coins</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Reference:">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_mean_shift_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_mean_shift.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">A demo of the mean-shift clustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="- a first experiment with fixed &quot;ground truth labels&quot; (and therefore fixed   number of classes)...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_adjusted_for_chance_measures_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_adjusted_for_chance_measures.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Adjustment for chance in clustering performance evaluation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the effect of imposing a connectivity graph to capture local structure in th...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_clustering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_clustering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Agglomerative clustering with and without structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates the effect of different metrics on the hierarchical clustering.">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_clustering_metrics_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_clustering_metrics.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Agglomerative clustering with different metrics</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example to show the output of the sklearn.cluster.kmeans_plusplus function for generating in...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_plusplus_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_kmeans_plusplus.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">An example of K-Means++ initialization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows differences between Regular K-Means algorithm and Bisecting K-Means.">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_bisect_kmeans_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_bisect_kmeans.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Bisecting K-Means and Regular K-Means Performance Comparison</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reduci...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_color_quantization_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_color_quantization.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Color Quantization using K-Means</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares the timing of BIRCH (with and without the global clustering step) and Min...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_birch_vs_minibatchkmeans_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_birch_vs_minibatchkmeans.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compare BIRCH and MiniBatchKMeans</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different clustering algorithms on datasets that are &quot;int...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_cluster_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_cluster_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing different clustering algorithms on toy datasets</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different linkage methods for hierarchical clustering on ...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_linkage_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_linkage_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing different hierarchical linkage methods on toy datasets</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is fa...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_mini_batch_kmeans_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_mini_batch_kmeans.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of the K-Means and MiniBatchKMeans clustering algorithms</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="DBSCAN (Density-Based Spatial Clustering of Applications with Noise) finds core samples in regi...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_dbscan_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_dbscan.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demo of DBSCAN clustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Finds core samples of high density and expands clusters from them. This example uses data that ...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_optics_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_optics.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demo of OPTICS clustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Reference: Brendan J. Frey and Delbert Dueck, &quot;Clustering by Passing Messages Between Data Poin...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_affinity_propagation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_affinity_propagation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demo of affinity propagation clustering algorithm</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example is meant to illustrate situations where k-means produces unintuitive and possibly ...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_assumptions_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_kmeans_assumptions.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demonstration of k-means assumptions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Evaluate the ability of k-means initializations strategies to make the algorithm convergence ro...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_stability_low_dim_dense_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_kmeans_stability_low_dim_dense.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Empirical evaluation of the impact of k-means initialization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="These images how similar features are merged together using feature agglomeration.">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_digits_agglomeration_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_digits_agglomeration.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Feature agglomeration</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares 2 dimensionality reduction strategies:">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_feature_agglomeration_vs_univariate_selection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_feature_agglomeration_vs_univariate_selection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Feature agglomeration vs. univariate selection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example builds a swiss roll dataset and runs hierarchical clustering on their position.">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_ward_structured_vs_unstructured_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_ward_structured_vs_unstructured.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Hierarchical clustering: structured vs unstructured ward</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Clustering can be expensive, especially when our dataset contains millions of datapoints. Many ...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_inductive_clustering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_inductive_clustering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Inductive Clustering</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The plot shows:">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_cluster_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_cluster_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">K-means Clustering</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example uses a large dataset of faces to learn a set of 20 x 20 images patches that consti...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_dict_face_patches_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_dict_face_patches.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Online learning of a dictionary of parts of faces</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot Hierarchical Clustering Dendrogram">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_agglomerative_dendrogram_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_dendrogram.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot Hierarchical Clustering Dendrogram</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example uses spectral_clustering on a graph created from voxel-to-voxel difference on an i...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_coin_segmentation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_coin_segmentation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Segmenting the picture of greek coins in regions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Silhouette analysis can be used to study the separation distance between the resulting clusters...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_kmeans_silhouette_analysis_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_kmeans_silhouette_analysis.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Selecting the number of clusters with silhouette analysis on KMeans clustering</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, an image with connected circles is generated and spectral clustering is used t...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_segmentation_toy_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_segmentation_toy.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Spectral clustering for image segmentation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An illustration of various linkage option for agglomerative clustering on a 2D embedding of the...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_digits_linkage_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_digits_linkage.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Various Agglomerative Clustering on a 2D embedding of digits</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how one can use KBinsDiscretizer to perform vector quantization on a set of ...">

.. only:: html

  .. image:: /auto_examples/cluster/images/thumb/sphx_glr_plot_face_compress_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cluster_plot_face_compress.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Vector Quantization Example</div>
    </div>


.. raw:: html

    </div>


Covariance estimation
---------------------

Examples concerning the :mod:`sklearn.covariance` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate can be regularized using shrinkage. Ledoit and...">

.. only:: html

  .. image:: /auto_examples/covariance/images/thumb/sphx_glr_plot_lw_vs_oas_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_covariance_plot_lw_vs_oas.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ledoit-Wolf vs OAS estimation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows covariance estimation with Mahalanobis distances on Gaussian distributed dat...">

.. only:: html

  .. image:: /auto_examples/covariance/images/thumb/sphx_glr_plot_mahalanobis_distances_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_covariance_plot_mahalanobis_distances.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Robust covariance estimation and Mahalanobis distances relevance</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers ...">

.. only:: html

  .. image:: /auto_examples/covariance/images/thumb/sphx_glr_plot_robust_vs_empirical_covariance_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_covariance_plot_robust_vs_empirical_covariance.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Robust vs Empirical covariance estimate</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="When working with covariance estimation, the usual approach is to use a maximum likelihood esti...">

.. only:: html

  .. image:: /auto_examples/covariance/images/thumb/sphx_glr_plot_covariance_estimation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_covariance_plot_covariance_estimation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Using the GraphicalLasso estimator to learn a covariance and sparse precision from a small numb...">

.. only:: html

  .. image:: /auto_examples/covariance/images/thumb/sphx_glr_plot_sparse_cov_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_covariance_plot_sparse_cov.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Sparse inverse covariance estimation</div>
    </div>


.. raw:: html

    </div>


Cross decomposition
-------------------

Examples concerning the :mod:`sklearn.cross_decomposition` module.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Simple usage of various cross decomposition algorithms:">

.. only:: html

  .. image:: /auto_examples/cross_decomposition/images/thumb/sphx_glr_plot_compare_cross_decomposition_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cross_decomposition_plot_compare_cross_decomposition.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compare cross decomposition methods</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares Principal Component Regression (PCR) and Partial Least Squares Regression...">

.. only:: html

  .. image:: /auto_examples/cross_decomposition/images/thumb/sphx_glr_plot_pcr_vs_pls_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_cross_decomposition_plot_pcr_vs_pls.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Principal Component Regression vs Partial Least Squares Regression</div>
    </div>


.. raw:: html

    </div>


Dataset examples
-----------------------

Examples concerning the :mod:`sklearn.datasets` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example plots several randomly generated classification datasets. For easy visualization, ...">

.. only:: html

  .. image:: /auto_examples/datasets/images/thumb/sphx_glr_plot_random_dataset_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_datasets_plot_random_dataset.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot randomly generated classification dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This illustrates the make_multilabel_classification dataset generator. Each sample consists of ...">

.. only:: html

  .. image:: /auto_examples/datasets/images/thumb/sphx_glr_plot_random_multilabel_dataset_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_datasets_plot_random_multilabel_dataset.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot randomly generated multilabel dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This dataset is made up of 1797 8x8 images. Each image, like the one shown below, is of a hand-...">

.. only:: html

  .. image:: /auto_examples/datasets/images/thumb/sphx_glr_plot_digits_last_image_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_datasets_plot_digits_last_image.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">The Digit Dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The rows being the samples and the columns being: Sepal Length, Sepal Width, Petal Length and P...">

.. only:: html

  .. image:: /auto_examples/datasets/images/thumb/sphx_glr_plot_iris_dataset_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_datasets_plot_iris_dataset.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">The Iris Dataset</div>
    </div>


.. raw:: html

    </div>


Decision Trees
--------------

Examples concerning the :mod:`sklearn.tree` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A 1D regression with decision tree.">

.. only:: html

  .. image:: /auto_examples/tree/images/thumb/sphx_glr_plot_tree_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_tree_plot_tree_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Decision Tree Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example to illustrate multi-output regression with decision tree.">

.. only:: html

  .. image:: /auto_examples/tree/images/thumb/sphx_glr_plot_tree_regression_multioutput_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_tree_plot_tree_regression_multioutput.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multi-output Decision Tree Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surface of a decision tree trained on pairs of features of the iris dataset.">

.. only:: html

  .. image:: /auto_examples/tree/images/thumb/sphx_glr_plot_iris_dtc_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_tree_plot_iris_dtc.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the decision surface of decision trees trained on the iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The DecisionTreeClassifier provides parameters such as min_samples_leaf and max_depth to preven...">

.. only:: html

  .. image:: /auto_examples/tree/images/thumb/sphx_glr_plot_cost_complexity_pruning_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_tree_plot_cost_complexity_pruning.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Post pruning decision trees with cost complexity pruning</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The decision tree structure can be analysed to gain further insight on the relation between the...">

.. only:: html

  .. image:: /auto_examples/tree/images/thumb/sphx_glr_plot_unveil_tree_structure_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_tree_plot_unveil_tree_structure.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Understanding the decision tree structure</div>
    </div>


.. raw:: html

    </div>


Decomposition
-------------

Examples concerning the :mod:`sklearn.decomposition` module.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example of estimating sources from noisy data.">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_ica_blind_source_separation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_ica_blind_source_separation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Blind source separation using FastICA</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Iris dataset represents 3 kind of Iris flowers (Setosa, Versicolour and Virginica) with 4 a...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_pca_vs_lda_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_pca_vs_lda.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of LDA and PCA 2D projection of Iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example applies to olivetti_faces_dataset different unsupervised matrix decomposition (dim...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_faces_decomposition_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_faces_decomposition.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Faces dataset decompositions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Investigating the Iris dataset, we see that sepal length, petal length and petal width are high...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_varimax_fa_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_varimax_fa.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Factor Analysis (with rotation) to visualize patterns</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates visually in the feature space a comparison by results using two differ...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_ica_vs_pca_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_ica_vs_pca.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">FastICA on 2D point clouds</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example comparing the effect of reconstructing noisy fragments of a raccoon face image using...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_image_denoising_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_image_denoising.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Image denoising using dictionary learning</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Incremental principal component analysis (IPCA) is typically used as a replacement for principa...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_incremental_pca_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_incremental_pca.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Incremental PCA</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the difference between the Principal Components Analysis (~sklearn.decomposi...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_kernel_pca_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_kernel_pca.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Kernel PCA</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Probabilistic PCA and Factor Analysis are probabilistic models. The consequence is that the lik...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_pca_vs_fa_model_selection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_pca_vs_fa_model_selection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Model selection with Probabilistic PCA and Factor Analysis (FA)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Principal Component Analysis applied to the Iris dataset.">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_pca_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_pca_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">PCA example with Iris Data-set</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="These figures aid in illustrating how a point cloud can be very flat in one direction--which is...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_pca_3d_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_pca_3d.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Principal components analysis (PCA)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Transform a signal as a sparse combination of Ricker wavelets. This example visually compares d...">

.. only:: html

  .. image:: /auto_examples/decomposition/images/thumb/sphx_glr_plot_sparse_coding_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_decomposition_plot_sparse_coding.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Sparse coding with a precomputed dictionary</div>
    </div>


.. raw:: html

    </div>


Ensemble methods
----------------

Examples concerning the :mod:`sklearn.ensemble` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will compare the training times and prediction performances of HistGradient...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_categorical_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_categorical.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Categorical Feature Support in Gradient Boosting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Stacking refers to a method to blend estimators. In this strategy, some estimators are individu...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_stack_predictors_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_stack_predictors.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Combine predictors using stacking</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example to compare multi-output regression with random forest and the multiclass meta-estima...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_random_forest_regression_multioutput_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_random_forest_regression_multioutput.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing random forests and the multi-output meta estimator</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A decision tree is boosted using the AdaBoost.R2 [1]_ algorithm on a 1D sinusoidal dataset with...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_adaboost_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_adaboost_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Decision Tree Regression with AdaBoost</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This notebook is based on Figure 10.2 from Hastie et al 2009 [1]_ and illustrates the differenc...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_adaboost_hastie_10_2_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_adaboost_hastie_10_2.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Discrete versus Real AdaBoost</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Gradient boosting is an ensembling technique where several weak learners (regression trees) are...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_early_stopping_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_early_stopping.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Early stopping of Gradient Boosting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of a forest of trees to evaluate the importance of features on an ar...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_forest_importances_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_forest_importances.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Feature importances with a forest of trees</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Transform your features into a higher dimensional, sparse space. Then train a linear model on t...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_feature_transformation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_feature_transformation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Feature transformations with ensembles of trees</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Gradient Boosting Out-of-Bag estimates">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_oob_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_oob.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gradient Boosting Out-of-Bag estimates</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates Gradient Boosting to produce a predictive model from an ensemble of w...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gradient Boosting regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Illustration of the effect of different regularization strategies for Gradient Boosting. The ex...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_regularization_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_regularization.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gradient Boosting regularization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="RandomTreesEmbedding provides a way to map data to a very high-dimensional, sparse representati...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_random_forest_embedding_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_random_forest_embedding.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Hashing feature transformation using Totally Random Trees</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example using IsolationForest for anomaly detection.">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_isolation_forest_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_isolation_forest.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">IsolationForest example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of monotonic constraints on a gradient boosting estimator.">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_monotonic_constraints_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_monotonic_constraints.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Monotonic Constraints</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example reproduces Figure 1 of Zhu et al [1]_ and shows how boosting can improve predictio...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_adaboost_multiclass_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_adaboost_multiclass.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multi-class AdaBoosted Decision Trees</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The RandomForestClassifier is trained using bootstrap aggregation, where each new tree is fit f...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_ensemble_oob_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_ensemble_oob.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">OOB Errors for Random Forests</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of a forest of trees to evaluate the impurity based importance of th...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_forest_importances_faces_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_forest_importances_faces.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Pixel importances with a parallel forest of trees</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the class probabilities of the first sample in a toy dataset predicted by three different ...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_voting_probas_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_voting_probas.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot class probabilities calculated by the VotingClassifier</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A voting regressor is an ensemble meta-estimator that fits several base regressors, each on the...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_voting_regressor_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_voting_regressor.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot individual and voting regression predictions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the decision boundaries of a VotingClassifier for two features of the Iris dataset.">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_voting_decision_regions_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_voting_decision_regions.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the decision boundaries of a VotingClassifier</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surfaces of forests of randomized trees trained on pairs of features of the i...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_forest_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_forest_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the decision surfaces of ensembles of trees on the iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how quantile regression can be used to create prediction intervals.">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_gradient_boosting_quantile_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_quantile.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Prediction Intervals for Gradient Boosting Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates and compares the bias-variance decomposition of the expected mean squa...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_bias_variance_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_bias_variance.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Single estimator versus bagging: bias-variance decomposition</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example fits an AdaBoosted decision stump on a non-linearly separable classification datas...">

.. only:: html

  .. image:: /auto_examples/ensemble/images/thumb/sphx_glr_plot_adaboost_twoclass_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_ensemble_plot_adaboost_twoclass.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Two-class AdaBoost</div>
    </div>


.. raw:: html

    </div>


Examples based on real world datasets
-------------------------------------

Applications to real world problems with some medium sized datasets or
interactive user interface.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the reconstruction of an image from a set of parallel projections, acquired ...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_tomography_l1_reconstruction_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_tomography_l1_reconstruction.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compressive sensing: tomography reconstruction with L1 prior (Lasso)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The dataset used in this example is a preprocessed excerpt of the &quot;Labeled Faces in the Wild&quot;, ...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_face_recognition_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_face_recognition.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Faces recognition example using eigenfaces and SVMs</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use KernelPCA to denoise images. In short, we take advantage of the a...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_digits_denoising_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_digits_denoising.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Image denoising using kernel PCA</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create da...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_svm_gui_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_svm_gui.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Libsvm GUI</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrate how model complexity influences both prediction accuracy and computational performa...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_model_complexity_influence_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_model_complexity_influence.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Model Complexity Influence</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used for classification using an out-of-core...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_out_of_core_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_out_of_core_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Out-of-core classification of text documents</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the need for robust covariance estimation on a real data set. It is us...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_outlier_detection_wine_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_outlier_detection_wine.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Outlier detection on a real data set</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This is an example showing the prediction latency of various scikit-learn estimators.">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_prediction_latency_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_prediction_latency.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Prediction Latency</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Modeling species&#x27; geographic distributions is an important problem in conservation biology. In ...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_species_distribution_modeling_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_species_distribution_modeling.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Species distribution modeling</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This notebook introduces different strategies to leverage time-related features for a bike shar...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_cyclical_feature_engineering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_cyclical_feature_engineering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Time-related feature engineering</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This is an example of applying NMF and LatentDirichletAllocation on a corpus of documents and e...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_topics_extraction_with_nmf_lda_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_topics_extraction_with_nmf_lda.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example employs several unsupervised learning techniques to extract the stock market struc...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_stock_market_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_plot_stock_market.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualizing the stock market structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A classical way to assert the relative importance of vertices in a graph is to compute the prin...">

.. only:: html

  .. image:: /auto_examples/applications/images/thumb/sphx_glr_wikipedia_principal_eigenvector_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_applications_wikipedia_principal_eigenvector.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Wikipedia principal eigenvector</div>
    </div>


.. raw:: html

    </div>


Feature Selection
-----------------------

Examples concerning the :mod:`sklearn.feature_selection` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the differences between univariate F-test statistics and mutual inform...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_f_test_vs_mi_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_f_test_vs_mi.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of F-test and mutual information</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates and compares two approaches for feature selection: SelectFromModel whi...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_select_from_model_diabetes_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_select_from_model_diabetes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Model-based and sequential feature selection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how a feature selection can be easily integrated within a machine learning p...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_feature_selection_pipeline_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_feature_selection_pipeline.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Pipeline ANOVA SVM</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A recursive feature elimination example showing the relevance of pixels in a digit classificati...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_rfe_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Recursive feature elimination</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A Recursive Feature Elimination (RFE) example with automatic tuning of the number of features s...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_rfe_with_cross_validation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Recursive feature elimination with cross-validation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This notebook is an example of using univariate feature selection to improve classification acc...">

.. only:: html

  .. image:: /auto_examples/feature_selection/images/thumb/sphx_glr_plot_feature_selection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_feature_selection_plot_feature_selection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Univariate Feature Selection</div>
    </div>


.. raw:: html

    </div>


Gaussian Mixture Models
-----------------------

Examples concerning the :mod:`sklearn.mixture` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example plots the ellipsoids obtained from a toy dataset (mixture of three Gaussians) fitt...">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_concentration_prior_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_concentration_prior.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the density estimation of a mixture of two Gaussians. Data is generated from two Gaussians...">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_pdf_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm_pdf.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Density Estimation for a Gaussian mixture</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Examples of the different methods of initialization in Gaussian Mixture Models">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_init_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm_init.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">GMM Initialization Methods</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of several covariances types for Gaussian mixture models.">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_covariances_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm_covariances.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">GMM covariances</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the confidence ellipsoids of a mixture of two Gaussians obtained with Expectation Maximisa...">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Ellipsoids</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows that model selection can be performed with Gaussian Mixture Models (GMM) usi...">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_selection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm_selection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Selection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the behavior of Gaussian mixture models fit on data that was not samp...">

.. only:: html

  .. image:: /auto_examples/mixture/images/thumb/sphx_glr_plot_gmm_sin_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_mixture_plot_gmm_sin.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Sine Curve</div>
    </div>


.. raw:: html

    </div>


Gaussian Process for Machine Learning
-------------------------------------

Examples concerning the :mod:`sklearn.gaussian_process` module.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates differences between a kernel ridge regression and a Gaussian process r...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_compare_gpr_krr_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_compare_gpr_krr.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of kernel ridge and Gaussian process regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A simple one-dimensional regression example computed in two different ways:">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpr_noisy_targets_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpr_noisy_targets.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian Processes regression: basic introductory example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an isotropic and anisotropic RBF ...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpc_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpc_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian process classification (GPC) on iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example is based on Section 5.4.3 of &quot;Gaussian Processes for Machine Learning&quot; [RW2006]_. ...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpr_co2_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpr_co2.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian process regression (GPR) on Mauna Loa CO2 data</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the ability of the WhiteKernel to estimate the noise level in the data. More...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpr_noisy_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpr_noisy.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian process regression (GPR) with noise-level estimation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Gaussian processes for regression and classification tasks ...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpr_on_structured_data_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpr_on_structured_data.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Gaussian processes on discrete data structures</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates GPC on XOR data. Compared are a stationary, isotropic kernel (RBF) and...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpc_xor_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpc_xor.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Illustration of Gaussian process classification (GPC) on the XOR dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the prior and posterior of a GaussianProcessRegressor with different k...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpr_prior_posterior_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpr_prior_posterior.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Illustration of prior and posterior Gaussian process for different kernels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A two-dimensional classification example showing iso-probability lines for the predicted probab...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpc_isoprobability_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpc_isoprobability.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Iso-probability lines for Gaussian Processes classification (GPC)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an RBF kernel with different choi...">

.. only:: html

  .. image:: /auto_examples/gaussian_process/images/thumb/sphx_glr_plot_gpc_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_gaussian_process_plot_gpc.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Probabilistic predictions with Gaussian process classification (GPC)</div>
    </div>


.. raw:: html

    </div>


Generalized Linear Models
-------------------------

Examples concerning the :mod:`sklearn.linear_model` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares two different bayesian regressors:">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ard_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ard.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing Linear Bayesian Regressors</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparing various online solvers">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing various online solvers</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Computes a Bayesian Ridge Regression of Sinusoids.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_bayesian_ridge_curvefit_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_bayesian_ridge_curvefit.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Curve Fitting with Bayesian Ridge Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Stochastic Gradient Descent is an optimization technique which minimizes a loss function in a s...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_early_stopping_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_early_stopping.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Early stopping of Stochastic Gradient Descent</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The following example shows how to precompute the gram matrix while using weighted samples with...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_elastic_net_precomputed_gram_matrix_with_weighted_samples_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_elastic_net_precomputed_gram_matrix_with_weighted_samples.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Fit Ridge and HuberRegressor on a dataset with outliers.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_huber_vs_ridge_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_huber_vs_ridge.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">HuberRegressor vs Ridge on dataset with strong outliers</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The multi-task lasso allows to fit multiple regression problems jointly enforcing the selected ...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_multi_task_lasso_support_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_multi_task_lasso_support.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Joint feature selection with multi-task Lasso</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparison of the sparsity (percentage of zero coefficients) of solutions when L1, L2 and Elast...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_l1_l2_sparsity_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_logistic_l1_l2_sparsity.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">L1 Penalty and Sparsity in Logistic Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_coordinate_descent_path_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_coordinate_descent_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso and Elastic Net</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Estimates Lasso and Elastic-Net regression models on a manually generated sparse signal corrupt...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_and_elasticnet_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso and Elastic Net for Sparse Signals</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example reproduces the example of Fig. 2 of [ZHT2007]_. A LassoLarsIC estimator is fit on ...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_lars_ic_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_lars_ic.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso model selection via information criteria</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example focuses on model selection for Lasso models that are linear models with an L1 pena...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_model_selection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_model_selection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso model selection: AIC-BIC / cross-validation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We show that linear_model.Lasso provides the same results for dense and sparse data and that in...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_dense_vs_sparse_data_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_dense_vs_sparse_data.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso on dense and sparse data</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Computes Lasso Path along the regularization parameter using the LARS algorithm on the diabetes...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_lars_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_lars.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Lasso path using LARS</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The coefficients, residual sum of squares and the coefficient of determination are also calcula...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ols.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Linear Regression Example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Show below is a logistic-regression classifiers decision boundaries on the first two dimensions...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_iris_logistic_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_iris_logistic.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Logistic Regression 3-class Classifier</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Shown in the plot is how the logistic regression would, in this synthetic dataset, classify val...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_logistic.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Logistic function</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Here we fit a multinomial logistic regression with L1 penalty on a subset of the MNIST digits c...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sparse_logistic_regression_mnist_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sparse_logistic_regression_mnist.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">MNIST classification using multinomial logistic + L1</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparison of multinomial logistic L1 vs one-versus-rest L1 logistic regression to classify doc...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sparse_logistic_regression_20newsgroups_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sparse_logistic_regression_20newsgroups.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multiclass sparse logistic regression on 20newgroups</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we fit a linear model with positive constraints on the regression coefficients...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_nnls_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_nnls.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Non-negative least squares</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to approximate the solution of sklearn.svm.OneClassSVM in the case of an...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgdocsvm_vs_ocsvm_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgdocsvm_vs_ocsvm.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">One-Class SVM versus One-Class SVM using Stochastic Gradient Descent</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Ridge regression is basically minimizing a penalised version of the least-squared function. The...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_ridge_variance_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ols_ridge_variance.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ordinary Least Squares and Ridge Regression Variance</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Using orthogonal matching pursuit for recovering a sparse signal from a noisy measurement encod...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_omp_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_omp.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Orthogonal Matching Pursuit</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Ridge Regression is the estimator used in this example. Each color in the left plot represents ...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ridge_coeffs_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ridge_coeffs.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot Ridge coefficients as a function of the L2 regularization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Shows the effect of collinearity in the coefficients of an estimator.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ridge_path_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ridge_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot Ridge coefficients as a function of the regularization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multi-class SGD on iris dataset. The hyperplanes corresponding to the ...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot multi-class SGD on the iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multinomial and One-vs-Rest Logistic Regression. The hyperplanes corre...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_multinomial_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_logistic_multinomial.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot multinomial and One-vs-Rest Logistic Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of log-linear Poisson regression on the French Motor Third-Par...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_poisson_regression_non_normal_loss_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_poisson_regression_non_normal_loss.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Poisson regression and non-normal loss</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to approximate a function with polynomials up to degree degree by...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_polynomial_interpolation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_polynomial_interpolation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Polynomial and Spline interpolation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how quantile regression can predict non-trivial conditional quantiles.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_quantile_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_quantile_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Quantile regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip=" Train l1-penalized logistic regression models on a binary classification problem derived from ...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_path_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_logistic_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Regularization path of L1- Logistic Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Here a sine function is fit with a polynomial of order 3, for values close to zero.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_robust_fit_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_robust_fit.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Robust linear estimator fitting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we see how to robustly fit a linear model to faulty data using the ransac_regr...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ransac_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ransac.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Robust linear model estimation using RANSAC</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a line...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_separating_hyperplane_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_separating_hyperplane.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SGD: Maximum margin separating hyperplane</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Contours of where the penalty is equal to 1 for the three penalties L1, L2 and elastic-net.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_penalties_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_penalties.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SGD: Penalties</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_weighted_samples_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_weighted_samples.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SGD: Weighted samples</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A plot that compares the various convex loss functions supported by SGDClassifier .">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_loss_functions_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_sgd_loss_functions.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SGD: convex loss functions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Features 1 and 2 of the diabetes-dataset are fitted and plotted below. It illustrates that alth...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_3d_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_ols_3d.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Sparsity Example: Fitting only features 1  and 2</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Computes a Theil-Sen Regression on a synthetic dataset.">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_theilsen_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_theilsen.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Theil-Sen Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Poisson, Gamma and Tweedie regression on the French Motor T...">

.. only:: html

  .. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_tweedie_regression_insurance_claims_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_linear_model_plot_tweedie_regression_insurance_claims.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Tweedie regression on insurance claims</div>
    </div>


.. raw:: html

    </div>


Inspection
----------

Examples related to the :mod:`sklearn.inspection` module.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In linear models, the target value is modeled as a linear combination of the features (see the ...">

.. only:: html

  .. image:: /auto_examples/inspection/images/thumb/sphx_glr_plot_linear_model_coefficient_interpretation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_inspection_plot_linear_model_coefficient_interpretation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Common pitfalls in the interpretation of coefficients of linear models</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Machine Learning models are great for measuring statistical associations. Unfortunately, unless...">

.. only:: html

  .. image:: /auto_examples/inspection/images/thumb/sphx_glr_plot_causal_interpretation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_inspection_plot_causal_interpretation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Failure of Machine Learning to infer causal effects</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Partial dependence plots show the dependence between the target function [2]_ and a set of feat...">

.. only:: html

  .. image:: /auto_examples/inspection/images/thumb/sphx_glr_plot_partial_dependence_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_inspection_plot_partial_dependence.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Partial Dependence and Individual Conditional Expectation Plots</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will compare the impurity-based feature importance of RandomForestClassifie...">

.. only:: html

  .. image:: /auto_examples/inspection/images/thumb/sphx_glr_plot_permutation_importance_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_inspection_plot_permutation_importance.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Permutation Importance vs Random Forest Feature Importance (MDI)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we compute the permutation importance on the Wisconsin breast cancer dataset u...">

.. only:: html

  .. image:: /auto_examples/inspection/images/thumb/sphx_glr_plot_permutation_importance_multicollinear_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_inspection_plot_permutation_importance_multicollinear.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Permutation Importance with Multicollinear or Correlated Features</div>
    </div>


.. raw:: html

    </div>


Kernel Approximation
--------------------

Examples concerning the :mod:`sklearn.kernel_approximation` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of PolynomialCountSketch to efficiently generate polynomial ke...">

.. only:: html

  .. image:: /auto_examples/kernel_approximation/images/thumb/sphx_glr_plot_scalable_poly_kernels_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_kernel_approximation_plot_scalable_poly_kernels.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Scalable learning with polynomial kernel approximation</div>
    </div>


.. raw:: html

    </div>


Manifold learning
-----------------------

Examples concerning the :mod:`sklearn.manifold` module.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An illustration of dimensionality reduction on the S-curve dataset with various manifold learni...">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_compare_methods_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_compare_methods.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of Manifold Learning methods</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An application of the different manifold techniques on a spherical data-set. Here one can see t...">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_manifold_sphere_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_manifold_sphere.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Manifold Learning methods on a severed sphere</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We illustrate various embedding techniques on the digits dataset.">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_lle_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_lle_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Manifold learning on handwritten digits: Locally Linear Embedding, Isomap...</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An illustration of the metric and non-metric MDS on generated noisy data.">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_mds_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_mds.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multi-dimensional scaling</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Swiss Roll And Swiss-Hole Reduction">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_swissroll_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_swissroll.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Swiss Roll And Swiss-Hole Reduction</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An illustration of t-SNE on the two concentric circles and the S-curve datasets for different p...">

.. only:: html

  .. image:: /auto_examples/manifold/images/thumb/sphx_glr_plot_t_sne_perplexity_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_manifold_plot_t_sne_perplexity.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">t-SNE: The effect of various perplexity values on the shape</div>
    </div>


.. raw:: html

    </div>


Miscellaneous
-------------

Miscellaneous and introductory examples for scikit-learn.




.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="    See also sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_partial_dependence_visualization_api_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Advanced Plotting With Partial Dependence</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different anomaly detection algorithms on 2D datasets. Da...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_anomaly_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_anomaly_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing anomaly detection algorithms for outlier detection on toy datasets</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel ...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_kernel_ridge_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_ridge_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison of kernel ridge regression and SVR</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The default configuration for displaying a pipeline in a Jupyter Notebook is &#x27;diagram&#x27; where se...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_pipeline_display_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_pipeline_display.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Displaying Pipelines</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates different ways estimators and pipelines can be displayed.">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_estimator_representation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_estimator_representation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Displaying estimators and complex pipelines</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example benchmarks outlier detection algorithms, local_outlier_factor (LOF) and isolation_...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_outlier_detection_bench_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_outlier_detection_bench.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Evaluation of outlier detection estimators</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example illustrating the approximation of the feature map of an RBF kernel.">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_kernel_approximation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_kernel_approximation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Explicit feature map approximation for RBF kernels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of multi-output estimator to complete images. The goal is to predict...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_multioutput_face_completion_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_multioutput_face_completion.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Face completion with a multi-output estimators</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example will demonstrate the set_output API to configure transformers to output pandas Dat...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_set_output_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_set_output.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Introducing the set_output API</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An illustration of the isotonic regression on generated data (non-linear monotonic trend with h...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_isotonic_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_isotonic_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Isotonic Regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example simulates a multi-label document classification problem. The dataset is generated ...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_multilabel_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_multilabel.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multilabel classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="ROC Curve with Visualization API">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_roc_curve_visualization_api_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">ROC Curve with Visualization API</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip=" The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly pr...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_johnson_lindenstrauss_bound_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_johnson_lindenstrauss_bound.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">The Johnson-Lindenstrauss bound for embedding with random projections</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will construct display objects, ConfusionMatrixDisplay, RocCurveDisplay, an...">

.. only:: html

  .. image:: /auto_examples/miscellaneous/images/thumb/sphx_glr_plot_display_object_visualization_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_miscellaneous_plot_display_object_visualization.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualizations with Display Objects</div>
    </div>


.. raw:: html

    </div>


Missing Value Imputation
------------------------

Examples concerning the :mod:`sklearn.impute` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Missing values can be replaced by the mean, the median or the most frequent value using the bas...">

.. only:: html

  .. image:: /auto_examples/impute/images/thumb/sphx_glr_plot_missing_values_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Imputing missing values before building an estimator</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The IterativeImputer class is very flexible - it can be used with a variety of estimators to do...">

.. only:: html

  .. image:: /auto_examples/impute/images/thumb/sphx_glr_plot_iterative_imputer_variants_comparison_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_impute_plot_iterative_imputer_variants_comparison.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Imputing missing values with variants of IterativeImputer</div>
    </div>


.. raw:: html

    </div>


Model Selection
-----------------------

Examples related to the :mod:`sklearn.model_selection` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example balances model complexity and cross-validated score by finding a decent accuracy w...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_refit_callable_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_refit_callable.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Balance model complexity and cross-validated score</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the class_likelihood_ratios function, which computes the positive and...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_likelihood_ratios_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_likelihood_ratios.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Class Likelihood Ratios to measure classification performance</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Compare randomized search and grid search for optimizing hyperparameters of a linear SVM with S...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_randomized_search_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_randomized_search.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing randomized search and grid search for hyperparameter estimation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares the parameter search performed by HalvingGridSearchCV and GridSearchCV.">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_successive_halving_heatmap_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_successive_halving_heatmap.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparison between grid search and successive halving</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example of confusion matrix usage to evaluate the quality of the output of a classifier on the ...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_confusion_matrix_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_confusion_matrix.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Confusion matrix</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples shows how a classifier is optimized by cross-validation, which is done using the ...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Custom refit strategy of a grid search with cross-validation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Multiple metric parameter search can be done by setting the scoring parameter to a list of metr...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_multi_metric_evaluation_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_multi_metric_evaluation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we compare two binary classification multi-threshold metrics: the Receiver Ope...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_det_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_det.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Detection error tradeoff (DET) curve</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example describes the use of the Receiver Operating Characteristic (ROC) metric to evaluat...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_roc_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_roc.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multiclass Receiver Operating Characteristic (ROC)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares non-nested and nested cross-validation strategies on a classifier of the ...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_nested_cross_validation_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_nested_cross_validation_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Nested versus non-nested cross-validation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use cross_val_predict together with PredictionErrorDisplay to visuali...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_cv_predict_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_cv_predict.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting Cross-Validated Predictions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we show how to use the class LearningCurveDisplay to easily plot learning curv...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_learning_curve_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_learning_curve.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting Learning Curves and Checking Models' Scalability</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this plot you can see the training scores and validation scores of an SVM for different valu...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_validation_curve_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_validation_curve.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plotting Validation Curves</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example of Precision-Recall metric to evaluate classifier output quality.">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_precision_recall_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_precision_recall.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Precision-Recall</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example presents how to estimate and visualize the variance of the Receiver Operating Char...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_roc_crossval_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_roc_crossval.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Receiver Operating Characteristic (ROC) with cross validation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The dataset used in this example is 20newsgroups_dataset which will be automatically downloaded...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_text_feature_extraction_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Sample pipeline for text feature extraction and evaluation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to statistically compare the performance of models trained and eva...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_stats_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_stats.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Statistical comparison of models using grid search</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how a successive halving search (~sklearn.model_selection.HalvingGridS...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_successive_halving_iterations_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_successive_halving_iterations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Successive Halving Iterations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of permutation_test_score to evaluate the significance of a c...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_permutation_tests_for_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_permutation_tests_for_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Test with permutations the significance of a classification score</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Illustration of how the performance of an estimator on unseen data (test data) is not the same ...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_train_error_vs_test_error_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_train_error_vs_test_error.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Train error vs Test error</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the problems of underfitting and overfitting and how we can use linea...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_underfitting_overfitting_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_underfitting_overfitting.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Underfitting vs. Overfitting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Choosing the right cross-validation object is a crucial part of fitting a model properly. There...">

.. only:: html

  .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_cv_indices_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_model_selection_plot_cv_indices.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualizing cross-validation behavior in scikit-learn</div>
    </div>


.. raw:: html

    </div>


Multioutput methods
-------------------

Examples concerning the :mod:`sklearn.multioutput` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="For this example we will use the yeast dataset which contains 2417 datapoints each with 103 fea...">

.. only:: html

  .. image:: /auto_examples/multioutput/images/thumb/sphx_glr_plot_classifier_chain_yeast_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_multioutput_plot_classifier_chain_yeast.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Classifier Chain</div>
    </div>


.. raw:: html

    </div>


Nearest Neighbors
-----------------------

Examples concerning the :mod:`sklearn.neighbors` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example presents how to chain KNeighborsTransformer and TSNE in a pipeline. It also shows ...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_approximate_nearest_neighbors_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_approximate_nearest_neighbors.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Approximate nearest neighbors in TSNE</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This examples demonstrates how to precompute the k nearest neighbors before using them in KNeig...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_caching_nearest_neighbors_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_caching_nearest_neighbors.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Caching nearest neighbors</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example comparing nearest neighbors classification with and without Neighborhood Components ...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_nca_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_nca_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing Nearest Neighbors with and without Neighborhood Components Analysis</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Neighborhood Components Analysis for dimensionality reduction.">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_nca_dim_reduction_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_nca_dim_reduction.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Dimensionality Reduction with Neighborhood Components Analysis</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example does not perform any learning over the data (see sphx_glr_auto_examples_applicatio...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_species_kde_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_species_kde.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Kernel Density Estimate of Species Distributions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how kernel density estimation (KDE), a powerful non-parametric density estim...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_digits_kde_sampling_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_digits_kde_sampling.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Kernel Density Estimation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Centroid classification. It will plot the decision boundaries for each ...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_nearest_centroid_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_nearest_centroid.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Nearest Centroid Classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Neighbors classification. It will plot the decision boundaries for each...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Nearest Neighbors Classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrate the resolution of a regression problem using a k-Nearest Neighbor and the interpola...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Nearest Neighbors regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates a learned distance metric that maximizes the nearest neighbors classif...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_nca_illustration_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_nca_illustration.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Neighborhood Components Analysis Illustration</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_lof_novelty_detection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_lof_novelty_detection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Novelty detection with Local Outlier Factor (LOF)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_lof_outlier_detection_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_lof_outlier_detection.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Outlier detection with Local Outlier Factor (LOF)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The first plot shows one of the problems with using histograms to visualize the density of poin...">

.. only:: html

  .. image:: /auto_examples/neighbors/images/thumb/sphx_glr_plot_kde_1d_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neighbors_plot_kde_1d.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Simple 1D Kernel Density Estimation</div>
    </div>


.. raw:: html

    </div>


Neural Networks
-----------------------

Examples concerning the :mod:`sklearn.neural_network` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example visualizes some training loss curves for different stochastic learning strategies,...">

.. only:: html

  .. image:: /auto_examples/neural_networks/images/thumb/sphx_glr_plot_mlp_training_curves_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neural_networks_plot_mlp_training_curves.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compare Stochastic learning strategies for MLPClassifier</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="For greyscale image data where pixel values can be interpreted as degrees of blackness on a whi...">

.. only:: html

  .. image:: /auto_examples/neural_networks/images/thumb/sphx_glr_plot_rbm_logistic_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neural_networks_plot_rbm_logistic_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Restricted Boltzmann Machine features for digit classification</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A comparison of different values for regularization parameter &#x27;alpha&#x27; on synthetic datasets. Th...">

.. only:: html

  .. image:: /auto_examples/neural_networks/images/thumb/sphx_glr_plot_mlp_alpha_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neural_networks_plot_mlp_alpha.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Varying regularization in Multi-layer Perceptron</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Sometimes looking at the learned coefficients of a neural network can provide insight into the ...">

.. only:: html

  .. image:: /auto_examples/neural_networks/images/thumb/sphx_glr_plot_mnist_filters_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_neural_networks_plot_mnist_filters.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Visualization of MLP weights on MNIST</div>
    </div>


.. raw:: html

    </div>


Pipelines and composite estimators
----------------------------------

Examples of how to compose transformers and pipelines from other estimators. See the :ref:`User Guide <combining_estimators>`.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Datasets can often contain components that require different feature extraction and processing ...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_column_transformer_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_column_transformer.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Column Transformer with Heterogeneous Data Sources</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to apply different preprocessing and feature extraction pipelines ...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_column_transformer_mixed_types_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_column_transformer_mixed_types.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Column Transformer with Mixed Types</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In many real-world examples, there are many ways to extract features from a dataset. Often it i...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_feature_union_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_feature_union.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Concatenating multiple feature extraction methods</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we give an overview of TransformedTargetRegressor. We use two examples to illu...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_transformed_target_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_transformed_target.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Effect of transforming the targets in regression model</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The PCA does an unsupervised dimensionality reduction, while the logistic regression does the p...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_digits_pipe_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_digits_pipe.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Pipelining: chaining a PCA and a logistic regression</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example constructs a pipeline that does dimensionality reduction followed by prediction wi...">

.. only:: html

  .. image:: /auto_examples/compose/images/thumb/sphx_glr_plot_compare_reduction_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_compose_plot_compare_reduction.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Selecting dimensionality reduction with Pipeline and GridSearchCV</div>
    </div>


.. raw:: html

    </div>


Preprocessing
-------------

Examples concerning the :mod:`sklearn.preprocessing` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Feature 0 (median income in a block) and feature 5 (average house occupancy) of the california_...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_all_scaling_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_all_scaling.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compare the effect of different scalers on data with outliers</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The TargetEncoder uses the value of the target to encode each categorical feature. In this exam...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_target_encoder_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_target_encoder.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Comparing Target Encoder with Other Encoders</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example presents the different strategies implemented in KBinsDiscretizer:">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_discretization_strategies_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_discretization_strategies.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Demonstrating the different strategies of KBinsDiscretizer</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A demonstration of feature discretization on synthetic classification datasets. Feature discret...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_discretization_classification_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_discretization_classification.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Feature discretization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Feature scaling through standardization, also called Z-score normalization, is an important pre...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_scaling_importance_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_scaling_importance.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Importance of Feature Scaling</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of the Box-Cox and Yeo-Johnson transforms through PowerTransf...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_map_data_to_normal_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_map_data_to_normal.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Map data to a normal distribution</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The example compares prediction result of linear regression (linear model) and decision tree (t...">

.. only:: html

  .. image:: /auto_examples/preprocessing/images/thumb/sphx_glr_plot_discretization_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_preprocessing_plot_discretization.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Using KBinsDiscretizer to discretize continuous features</div>
    </div>


.. raw:: html

    </div>


Semi Supervised Classification
------------------------------

Examples concerning the :mod:`sklearn.semi_supervised` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A comparison for the decision boundaries generated on the iris dataset by Label Spreading, Self...">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_semi_supervised_versus_svm_iris_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_semi_supervised_versus_svm_iris.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of a varying threshold on self-training. The breast_cancer ...">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_self_training_varying_threshold_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_self_training_varying_threshold.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Effect of varying threshold for self-training</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates an active learning technique to learn handwritten digits using label propagation.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_digits_active_learning_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_label_propagation_digits_active_learning.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation digits active learning</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the power of semisupervised learning by training a Label Spreading mo...">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_label_propagation_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation digits: Demonstrating performance</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example of LabelPropagation learning a complex internal structure to demonstrate &quot;manifold lear...">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_structure_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_label_propagation_structure.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation learning a complex structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, semi-supervised classifiers are trained on the 20 newsgroups dataset (which wi...">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_semi_supervised_newsgroups_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_semi_supervised_plot_semi_supervised_newsgroups.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Semi-supervised Classification on a Text Dataset</div>
    </div>


.. raw:: html

    </div>


Support Vector Machines
-----------------------

Examples concerning the :mod:`sklearn.svm` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a ...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_nonlinear_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_nonlinear.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Non-linear SVM</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="An example using a one-class SVM for novelty detection.">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_oneclass_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_oneclass.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">One-class SVM with non-linear kernel (RBF)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparison of different linear SVM classifiers on a 2D projection of the iris dataset. We only ...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_iris_svc_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_iris_svc.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot different SVM classifiers in the iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Unlike SVC (based on LIBSVM), LinearSVC (based on LIBLINEAR) does not provide the support vecto...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_linearsvc_support_vectors_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_linearsvc_support_vectors.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the support vectors in LinearSVC</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of the parameters gamma and C of the Radial Basis Function ...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_rbf_parameters_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_rbf_parameters.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">RBF SVM parameters</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A small value of C includes more/all the observations, allowing the margins to be calculated us...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_margin_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_margin.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM Margins Example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The two plots differ only in the area in the middle where the classes are tied. If break_ties=F...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_tie_breaking_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_tie_breaking.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM Tie Breaking Example</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_custom_kernel_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_custom_kernel.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM with custom kernel</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to perform univariate feature selection before running a SVC (support ve...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_anova_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_anova.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM-Anova: SVM with univariate feature selection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_kernels_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_kernels.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM-Kernels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a Supp...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_separating_hyperplane_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_separating_hyperplane.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM: Maximum margin separating hyperplane</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Find the optimal separating hyperplane using an SVC for classes that are unbalanced.">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_separating_hyperplane_unbalanced_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_separating_hyperplane_unbalanced.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM: Separating hyperplane for unbalanced classes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_weighted_samples_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_weighted_samples.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM: Weighted samples</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The following example illustrates the effect of scaling the regularization parameter when using...">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_scale_c_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_scale_c.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Scaling the regularization parameter for SVCs</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Toy example of 1D regression using linear, polynomial and RBF kernels.">

.. only:: html

  .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_regression_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_svm_plot_svm_regression.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Support Vector Regression (SVR) using linear and non-linear kernels</div>
    </div>


.. raw:: html

    </div>

Tutorial exercises
------------------

Exercises for the tutorials



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise using Cross-validation with an SVM on the Digits dataset.">

.. only:: html

  .. image:: /auto_examples/exercises/images/thumb/sphx_glr_plot_cv_digits_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_exercises_plot_cv_digits.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Cross-validation on Digits Dataset Exercise</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise which uses cross-validation with linear models.">

.. only:: html

  .. image:: /auto_examples/exercises/images/thumb/sphx_glr_plot_cv_diabetes_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_exercises_plot_cv_diabetes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Cross-validation on diabetes Dataset Exercise</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise regarding the use of classification techniques on the Digits dataset.">

.. only:: html

  .. image:: /auto_examples/exercises/images/thumb/sphx_glr_plot_digits_classification_exercise_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_exercises_plot_digits_classification_exercise.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Digits Classification Exercise</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise for using different SVM kernels.">

.. only:: html

  .. image:: /auto_examples/exercises/images/thumb/sphx_glr_plot_iris_exercise_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_exercises_plot_iris_exercise.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">SVM Exercise</div>
    </div>


.. raw:: html

    </div>


Working with text documents
----------------------------

Examples concerning the :mod:`sklearn.feature_extraction.text` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used to classify documents by topics using a...">

.. only:: html

  .. image:: /auto_examples/text/images/thumb/sphx_glr_plot_document_classification_20newsgroups_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_text_plot_document_classification_20newsgroups.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Classification of text documents using sparse features</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how the scikit-learn API can be used to cluster documents by topics ...">

.. only:: html

  .. image:: /auto_examples/text/images/thumb/sphx_glr_plot_document_clustering_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_text_plot_document_clustering.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Clustering text documents using k-means</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example we illustrate text vectorization, which is the process of representing non-nume...">

.. only:: html

  .. image:: /auto_examples/text/images/thumb/sphx_glr_plot_hashing_vs_dict_vectorizer_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_text_plot_hashing_vs_dict_vectorizer.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">FeatureHasher and DictVectorizer Comparison</div>
    </div>


.. raw:: html

    </div>


.. toctree::
   :hidden:
   :includehidden:


   /auto_examples/release_highlights/index.rst
   /auto_examples/bicluster/index.rst
   /auto_examples/calibration/index.rst
   /auto_examples/classification/index.rst
   /auto_examples/cluster/index.rst
   /auto_examples/covariance/index.rst
   /auto_examples/cross_decomposition/index.rst
   /auto_examples/datasets/index.rst
   /auto_examples/tree/index.rst
   /auto_examples/decomposition/index.rst
   /auto_examples/ensemble/index.rst
   /auto_examples/applications/index.rst
   /auto_examples/feature_selection/index.rst
   /auto_examples/mixture/index.rst
   /auto_examples/gaussian_process/index.rst
   /auto_examples/linear_model/index.rst
   /auto_examples/inspection/index.rst
   /auto_examples/kernel_approximation/index.rst
   /auto_examples/manifold/index.rst
   /auto_examples/miscellaneous/index.rst
   /auto_examples/impute/index.rst
   /auto_examples/model_selection/index.rst
   /auto_examples/multioutput/index.rst
   /auto_examples/neighbors/index.rst
   /auto_examples/neural_networks/index.rst
   /auto_examples/compose/index.rst
   /auto_examples/preprocessing/index.rst
   /auto_examples/semi_supervised/index.rst
   /auto_examples/svm/index.rst
   /auto_examples/exercises/index.rst
   /auto_examples/text/index.rst


.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-gallery

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download all examples in Python source code: auto_examples_python.zip </auto_examples/auto_examples_python.zip>`

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip </auto_examples/auto_examples_jupyter.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_