<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta property="og:title" content="Examples" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://scikit-learn/stable/auto_examples/index.html" />
<meta property="og:site_name" content="scikit-learn" />
<meta property="og:description" content="Release Highlights: These examples illustrate the main features of the releases of scikit-learn. Release Highlights for scikit-learn 1.2 Release Highlights for scikit-learn 1.2 Release Highlights f..." />
<meta property="og:image" content="https://scikit-learn/stable/_images/sphx_glr_plot_release_highlights_1_2_0_thumb.png" />
<meta property="og:image:alt" content="Release Highlights for scikit-learn 1.2" />
<meta name="description" content="Release Highlights: These examples illustrate the main features of the releases of scikit-learn. Release Highlights for scikit-learn 1.2 Release Highlights for scikit-learn 1.2 Release Highlights f..." />

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  
  <title>Examples &mdash; scikit-learn 1.3.dev0 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/auto_examples/index.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/plot_directive.css" type="text/css" />
  <link rel="stylesheet" href="../_static/sg_gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/sg_gallery-binder.css" type="text/css" />
  <link rel="stylesheet" href="../_static/sg_gallery-dataframe.css" type="text/css" />
  <link rel="stylesheet" href="../_static/sg_gallery-rendered-html.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/js/vendor/jquery-3.6.3.slim.min.js"></script> 
</head>
<body>




<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="#">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" target="_blank" rel="noopener noreferrer" href="https://blog.scikit-learn.org/">Community</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html" >Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html" >Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../whats_new/v1.3.html" >What's new</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html" >Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html" >Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html" >FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../support.html" >Support</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html" >Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html" >Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../governance.html" >Governance</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html" >About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn" >GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html" >Other Versions and Download</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html" >Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html" >Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../whats_new/v1.3.html" >What's new</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html" >Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html" >Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html" >FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../support.html" >Support</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html" >Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html" >Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../governance.html" >Governance</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html" >About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn" >GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html" >Other Versions and Download</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="../glossary.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Glossary of Common Terms and API Elements">Prev</a>
            <a href="#" role="button" class="btn sk-btn-rellink disabled py-1">Up</a>
            <a href="release_highlights/index.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release Highlights">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 1.3.dev0</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
            <div class="sk-sidebar-toc">
              <ul>
<li><a class="reference internal" href="#">Examples</a><ul>
<li><a class="reference internal" href="#release-highlights">Release Highlights</a></li>
<li><a class="reference internal" href="#biclustering">Biclustering</a></li>
<li><a class="reference internal" href="#calibration">Calibration</a></li>
<li><a class="reference internal" href="#classification">Classification</a></li>
<li><a class="reference internal" href="#clustering">Clustering</a></li>
<li><a class="reference internal" href="#covariance-estimation">Covariance estimation</a></li>
<li><a class="reference internal" href="#cross-decomposition">Cross decomposition</a></li>
<li><a class="reference internal" href="#dataset-examples">Dataset examples</a></li>
<li><a class="reference internal" href="#decision-trees">Decision Trees</a></li>
<li><a class="reference internal" href="#decomposition">Decomposition</a></li>
<li><a class="reference internal" href="#ensemble-methods">Ensemble methods</a></li>
<li><a class="reference internal" href="#examples-based-on-real-world-datasets">Examples based on real world datasets</a></li>
<li><a class="reference internal" href="#feature-selection">Feature Selection</a></li>
<li><a class="reference internal" href="#gaussian-mixture-models">Gaussian Mixture Models</a></li>
<li><a class="reference internal" href="#gaussian-process-for-machine-learning">Gaussian Process for Machine Learning</a></li>
<li><a class="reference internal" href="#generalized-linear-models">Generalized Linear Models</a></li>
<li><a class="reference internal" href="#inspection">Inspection</a></li>
<li><a class="reference internal" href="#kernel-approximation">Kernel Approximation</a></li>
<li><a class="reference internal" href="#manifold-learning">Manifold learning</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
<li><a class="reference internal" href="#missing-value-imputation">Missing Value Imputation</a></li>
<li><a class="reference internal" href="#model-selection">Model Selection</a></li>
<li><a class="reference internal" href="#multioutput-methods">Multioutput methods</a></li>
<li><a class="reference internal" href="#nearest-neighbors">Nearest Neighbors</a></li>
<li><a class="reference internal" href="#neural-networks">Neural Networks</a></li>
<li><a class="reference internal" href="#pipelines-and-composite-estimators">Pipelines and composite estimators</a></li>
<li><a class="reference internal" href="#preprocessing">Preprocessing</a></li>
<li><a class="reference internal" href="#semi-supervised-classification">Semi Supervised Classification</a></li>
<li><a class="reference internal" href="#support-vector-machines">Support Vector Machines</a></li>
<li><a class="reference internal" href="#tutorial-exercises">Tutorial exercises</a></li>
<li><a class="reference internal" href="#working-with-text-documents">Working with text documents</a></li>
</ul>
</li>
</ul>

            </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <section id="examples">
<span id="general-examples"></span><h1>Examples<a class="headerlink" href="#examples" title="Permalink to this heading">¶</a></h1>
<div class="sphx-glr-thumbnails"></div><section id="release-highlights">
<h2>Release Highlights<a class="headerlink" href="#release-highlights" title="Permalink to this heading">¶</a></h2>
<p>These examples illustrate the main features of the releases of scikit-learn.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 1.2! Many bug fixes and improvements wer..."><img alt="Release Highlights for scikit-learn 1.2" src="../_images/sphx_glr_plot_release_highlights_1_2_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_1_2_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-2-0-py"><span class="std std-ref">Release Highlights for scikit-learn 1.2</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.2</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 1.1! Many bug fixes and improvements wer..."><img alt="Release Highlights for scikit-learn 1.1" src="../_images/sphx_glr_plot_release_highlights_1_1_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_1_1_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-1-0-py"><span class="std std-ref">Release Highlights for scikit-learn 1.1</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.1</div>
</div><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..."><img alt="Release Highlights for scikit-learn 1.0" src="../_images/sphx_glr_plot_release_highlights_1_0_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_1_0_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-0-0-py"><span class="std std-ref">Release Highlights for scikit-learn 1.0</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 1.0</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.24! Many bug fixes and improvements we..."><img alt="Release Highlights for scikit-learn 0.24" src="../_images/sphx_glr_plot_release_highlights_0_24_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_0_24_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-24-0-py"><span class="std std-ref">Release Highlights for scikit-learn 0.24</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.24</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.23! Many bug fixes and improvements we..."><img alt="Release Highlights for scikit-learn 0.23" src="../_images/sphx_glr_plot_release_highlights_0_23_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_0_23_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-23-0-py"><span class="std std-ref">Release Highlights for scikit-learn 0.23</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.23</div>
</div><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..."><img alt="Release Highlights for scikit-learn 0.22" src="../_images/sphx_glr_plot_release_highlights_0_22_0_thumb.png" />
<p><a class="reference internal" href="release_highlights/plot_release_highlights_0_22_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-22-0-py"><span class="std std-ref">Release Highlights for scikit-learn 0.22</span></a></p>
  <div class="sphx-glr-thumbnail-title">Release Highlights for scikit-learn 0.22</div>
</div></div></section>
<section id="biclustering">
<h2>Biclustering<a class="headerlink" href="#biclustering" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster.bicluster</span></code> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a checkerboard dataset and bicluster it using the Spe..."><img alt="A demo of the Spectral Biclustering algorithm" src="../_images/sphx_glr_plot_spectral_biclustering_thumb.png" />
<p><a class="reference internal" href="bicluster/plot_spectral_biclustering.html#sphx-glr-auto-examples-bicluster-plot-spectral-biclustering-py"><span class="std std-ref">A demo of the Spectral Biclustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">A demo of the Spectral Biclustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a dataset and bicluster it using the Spectral Co-Clus..."><img alt="A demo of the Spectral Co-Clustering algorithm" src="../_images/sphx_glr_plot_spectral_coclustering_thumb.png" />
<p><a class="reference internal" href="bicluster/plot_spectral_coclustering.html#sphx-glr-auto-examples-bicluster-plot-spectral-coclustering-py"><span class="std std-ref">A demo of the Spectral Co-Clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">A demo of the Spectral Co-Clustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the Spectral Co-clustering algorithm on the twenty newsgroups dataset..."><img alt="Biclustering documents with the Spectral Co-clustering algorithm" src="../_images/sphx_glr_plot_bicluster_newsgroups_thumb.png" />
<p><a class="reference internal" href="bicluster/plot_bicluster_newsgroups.html#sphx-glr-auto-examples-bicluster-plot-bicluster-newsgroups-py"><span class="std std-ref">Biclustering documents with the Spectral Co-clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">Biclustering documents with the Spectral Co-clustering algorithm</div>
</div></div></section>
<section id="calibration">
<h2>Calibration<a class="headerlink" href="#calibration" title="Permalink to this heading">¶</a></h2>
<p>Examples illustrating the calibration of predicted probabilities of classifiers.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Well calibrated classifiers are probabilistic classifiers for which the output of predict_proba..."><img alt="Comparison of Calibration of Classifiers" src="../_images/sphx_glr_plot_compare_calibration_thumb.png" />
<p><a class="reference internal" href="calibration/plot_compare_calibration.html#sphx-glr-auto-examples-calibration-plot-compare-calibration-py"><span class="std std-ref">Comparison of Calibration of Classifiers</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of Calibration of Classifiers</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="When performing classification one often wants to predict not only the class label, but also th..."><img alt="Probability Calibration curves" src="../_images/sphx_glr_plot_calibration_curve_thumb.png" />
<p><a class="reference internal" href="calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py"><span class="std std-ref">Probability Calibration curves</span></a></p>
  <div class="sphx-glr-thumbnail-title">Probability Calibration curves</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class ..."><img alt="Probability Calibration for 3-class classification" src="../_images/sphx_glr_plot_calibration_multiclass_thumb.png" />
<p><a class="reference internal" href="calibration/plot_calibration_multiclass.html#sphx-glr-auto-examples-calibration-plot-calibration-multiclass-py"><span class="std std-ref">Probability Calibration for 3-class classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Probability Calibration for 3-class classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="When performing classification you often want to predict not only the class label, but also the..."><img alt="Probability calibration of classifiers" src="../_images/sphx_glr_plot_calibration_thumb.png" />
<p><a class="reference internal" href="calibration/plot_calibration.html#sphx-glr-auto-examples-calibration-plot-calibration-py"><span class="std std-ref">Probability calibration of classifiers</span></a></p>
  <div class="sphx-glr-thumbnail-title">Probability calibration of classifiers</div>
</div></div></section>
<section id="classification">
<h2>Classification<a class="headerlink" href="#classification" title="Permalink to this heading">¶</a></h2>
<p>General examples about classification algorithms.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="A comparison of a several classifiers in scikit-learn on synthetic datasets. The point of this ..."><img alt="Classifier comparison" src="../_images/sphx_glr_plot_classifier_comparison_thumb.png" />
<p><a class="reference internal" href="classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py"><span class="std std-ref">Classifier comparison</span></a></p>
  <div class="sphx-glr-thumbnail-title">Classifier comparison</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example plots the covariance ellipsoids of each class and decision boundary learned by LDA..."><img alt="Linear and Quadratic Discriminant Analysis with covariance ellipsoid" src="../_images/sphx_glr_plot_lda_qda_thumb.png" />
<p><a class="reference internal" href="classification/plot_lda_qda.html#sphx-glr-auto-examples-classification-plot-lda-qda-py"><span class="std std-ref">Linear and Quadratic Discriminant Analysis with covariance ellipsoid</span></a></p>
  <div class="sphx-glr-thumbnail-title">Linear and Quadratic Discriminant Analysis with covariance ellipsoid</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how the Ledoit-Wolf and Oracle Shrinkage Approximating (OAS) estimator..."><img alt="Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification" src="../_images/sphx_glr_plot_lda_thumb.png" />
<p><a class="reference internal" href="classification/plot_lda.html#sphx-glr-auto-examples-classification-plot-lda-py"><span class="std std-ref">Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Normal, Ledoit-Wolf and OAS Linear Discriminant Analysis for classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the classification probability for different classifiers. We use a 3 class dataset, and we..."><img alt="Plot classification probability" src="../_images/sphx_glr_plot_classification_probability_thumb.png" />
<p><a class="reference internal" href="classification/plot_classification_probability.html#sphx-glr-auto-examples-classification-plot-classification-probability-py"><span class="std std-ref">Plot classification probability</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot classification probability</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how scikit-learn can be used to recognize images of hand-written digits, fro..."><img alt="Recognizing hand-written digits" src="../_images/sphx_glr_plot_digits_classification_thumb.png" />
<p><a class="reference internal" href="classification/plot_digits_classification.html#sphx-glr-auto-examples-classification-plot-digits-classification-py"><span class="std std-ref">Recognizing hand-written digits</span></a></p>
  <div class="sphx-glr-thumbnail-title">Recognizing hand-written digits</div>
</div></div></section>
<section id="clustering">
<h2>Clustering<a class="headerlink" href="#clustering" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="In this example we compare the various initialization strategies for K-means in terms of runtim..."><img alt="A demo of K-Means clustering on the handwritten digits data" src="../_images/sphx_glr_plot_kmeans_digits_thumb.png" />
<p><a class="reference internal" href="cluster/plot_kmeans_digits.html#sphx-glr-auto-examples-cluster-plot-kmeans-digits-py"><span class="std std-ref">A demo of K-Means clustering on the handwritten digits data</span></a></p>
  <div class="sphx-glr-thumbnail-title">A demo of K-Means clustering on the handwritten digits data</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Compute the segmentation of a 2D image with Ward hierarchical clustering. The clustering is spa..."><img alt="A demo of structured Ward hierarchical clustering on an image of coins" src="../_images/sphx_glr_plot_coin_ward_segmentation_thumb.png" />
<p><a class="reference internal" href="cluster/plot_coin_ward_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-ward-segmentation-py"><span class="std std-ref">A demo of structured Ward hierarchical clustering on an image of coins</span></a></p>
  <div class="sphx-glr-thumbnail-title">A demo of structured Ward hierarchical clustering on an image of coins</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Reference:"><img alt="A demo of the mean-shift clustering algorithm" src="../_images/sphx_glr_plot_mean_shift_thumb.png" />
<p><a class="reference internal" href="cluster/plot_mean_shift.html#sphx-glr-auto-examples-cluster-plot-mean-shift-py"><span class="std std-ref">A demo of the mean-shift clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">A demo of the mean-shift clustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="- a first experiment with fixed &quot;ground truth labels&quot; (and therefore fixed   number of classes)..."><img alt="Adjustment for chance in clustering performance evaluation" src="../_images/sphx_glr_plot_adjusted_for_chance_measures_thumb.png" />
<p><a class="reference internal" href="cluster/plot_adjusted_for_chance_measures.html#sphx-glr-auto-examples-cluster-plot-adjusted-for-chance-measures-py"><span class="std std-ref">Adjustment for chance in clustering performance evaluation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Adjustment for chance in clustering performance evaluation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the effect of imposing a connectivity graph to capture local structure in th..."><img alt="Agglomerative clustering with and without structure" src="../_images/sphx_glr_plot_agglomerative_clustering_thumb.png" />
<p><a class="reference internal" href="cluster/plot_agglomerative_clustering.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-py"><span class="std std-ref">Agglomerative clustering with and without structure</span></a></p>
  <div class="sphx-glr-thumbnail-title">Agglomerative clustering with and without structure</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Demonstrates the effect of different metrics on the hierarchical clustering."><img alt="Agglomerative clustering with different metrics" src="../_images/sphx_glr_plot_agglomerative_clustering_metrics_thumb.png" />
<p><a class="reference internal" href="cluster/plot_agglomerative_clustering_metrics.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-metrics-py"><span class="std std-ref">Agglomerative clustering with different metrics</span></a></p>
  <div class="sphx-glr-thumbnail-title">Agglomerative clustering with different metrics</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example to show the output of the sklearn.cluster.kmeans_plusplus function for generating in..."><img alt="An example of K-Means++ initialization" src="../_images/sphx_glr_plot_kmeans_plusplus_thumb.png" />
<p><a class="reference internal" href="cluster/plot_kmeans_plusplus.html#sphx-glr-auto-examples-cluster-plot-kmeans-plusplus-py"><span class="std std-ref">An example of K-Means++ initialization</span></a></p>
  <div class="sphx-glr-thumbnail-title">An example of K-Means++ initialization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows differences between Regular K-Means algorithm and Bisecting K-Means."><img alt="Bisecting K-Means and Regular K-Means Performance Comparison" src="../_images/sphx_glr_plot_bisect_kmeans_thumb.png" />
<p><a class="reference internal" href="cluster/plot_bisect_kmeans.html#sphx-glr-auto-examples-cluster-plot-bisect-kmeans-py"><span class="std std-ref">Bisecting K-Means and Regular K-Means Performance Comparison</span></a></p>
  <div class="sphx-glr-thumbnail-title">Bisecting K-Means and Regular K-Means Performance Comparison</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reduci..."><img alt="Color Quantization using K-Means" src="../_images/sphx_glr_plot_color_quantization_thumb.png" />
<p><a class="reference internal" href="cluster/plot_color_quantization.html#sphx-glr-auto-examples-cluster-plot-color-quantization-py"><span class="std std-ref">Color Quantization using K-Means</span></a></p>
  <div class="sphx-glr-thumbnail-title">Color Quantization using K-Means</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example compares the timing of BIRCH (with and without the global clustering step) and Min..."><img alt="Compare BIRCH and MiniBatchKMeans" src="../_images/sphx_glr_plot_birch_vs_minibatchkmeans_thumb.png" />
<p><a class="reference internal" href="cluster/plot_birch_vs_minibatchkmeans.html#sphx-glr-auto-examples-cluster-plot-birch-vs-minibatchkmeans-py"><span class="std std-ref">Compare BIRCH and MiniBatchKMeans</span></a></p>
  <div class="sphx-glr-thumbnail-title">Compare BIRCH and MiniBatchKMeans</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different clustering algorithms on datasets that are &quot;int..."><img alt="Comparing different clustering algorithms on toy datasets" src="../_images/sphx_glr_plot_cluster_comparison_thumb.png" />
<p><a class="reference internal" href="cluster/plot_cluster_comparison.html#sphx-glr-auto-examples-cluster-plot-cluster-comparison-py"><span class="std std-ref">Comparing different clustering algorithms on toy datasets</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing different clustering algorithms on toy datasets</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different linkage methods for hierarchical clustering on ..."><img alt="Comparing different hierarchical linkage methods on toy datasets" src="../_images/sphx_glr_plot_linkage_comparison_thumb.png" />
<p><a class="reference internal" href="cluster/plot_linkage_comparison.html#sphx-glr-auto-examples-cluster-plot-linkage-comparison-py"><span class="std std-ref">Comparing different hierarchical linkage methods on toy datasets</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing different hierarchical linkage methods on toy datasets</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is fa..."><img alt="Comparison of the K-Means and MiniBatchKMeans clustering algorithms" src="../_images/sphx_glr_plot_mini_batch_kmeans_thumb.png" />
<p><a class="reference internal" href="cluster/plot_mini_batch_kmeans.html#sphx-glr-auto-examples-cluster-plot-mini-batch-kmeans-py"><span class="std std-ref">Comparison of the K-Means and MiniBatchKMeans clustering algorithms</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of the K-Means and MiniBatchKMeans clustering algorithms</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="DBSCAN (Density-Based Spatial Clustering of Applications with Noise) finds core samples in regi..."><img alt="Demo of DBSCAN clustering algorithm" src="../_images/sphx_glr_plot_dbscan_thumb.png" />
<p><a class="reference internal" href="cluster/plot_dbscan.html#sphx-glr-auto-examples-cluster-plot-dbscan-py"><span class="std std-ref">Demo of DBSCAN clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demo of DBSCAN clustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Finds core samples of high density and expands clusters from them. This example uses data that ..."><img alt="Demo of OPTICS clustering algorithm" src="../_images/sphx_glr_plot_optics_thumb.png" />
<p><a class="reference internal" href="cluster/plot_optics.html#sphx-glr-auto-examples-cluster-plot-optics-py"><span class="std std-ref">Demo of OPTICS clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demo of OPTICS clustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Reference: Brendan J. Frey and Delbert Dueck, &quot;Clustering by Passing Messages Between Data Poin..."><img alt="Demo of affinity propagation clustering algorithm" src="../_images/sphx_glr_plot_affinity_propagation_thumb.png" />
<p><a class="reference internal" href="cluster/plot_affinity_propagation.html#sphx-glr-auto-examples-cluster-plot-affinity-propagation-py"><span class="std std-ref">Demo of affinity propagation clustering algorithm</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demo of affinity propagation clustering algorithm</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example is meant to illustrate situations where k-means produces unintuitive and possibly ..."><img alt="Demonstration of k-means assumptions" src="../_images/sphx_glr_plot_kmeans_assumptions_thumb.png" />
<p><a class="reference internal" href="cluster/plot_kmeans_assumptions.html#sphx-glr-auto-examples-cluster-plot-kmeans-assumptions-py"><span class="std std-ref">Demonstration of k-means assumptions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demonstration of k-means assumptions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Evaluate the ability of k-means initializations strategies to make the algorithm convergence ro..."><img alt="Empirical evaluation of the impact of k-means initialization" src="../_images/sphx_glr_plot_kmeans_stability_low_dim_dense_thumb.png" />
<p><a class="reference internal" href="cluster/plot_kmeans_stability_low_dim_dense.html#sphx-glr-auto-examples-cluster-plot-kmeans-stability-low-dim-dense-py"><span class="std std-ref">Empirical evaluation of the impact of k-means initialization</span></a></p>
  <div class="sphx-glr-thumbnail-title">Empirical evaluation of the impact of k-means initialization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="These images how similar features are merged together using feature agglomeration."><img alt="Feature agglomeration" src="../_images/sphx_glr_plot_digits_agglomeration_thumb.png" />
<p><a class="reference internal" href="cluster/plot_digits_agglomeration.html#sphx-glr-auto-examples-cluster-plot-digits-agglomeration-py"><span class="std std-ref">Feature agglomeration</span></a></p>
  <div class="sphx-glr-thumbnail-title">Feature agglomeration</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example compares 2 dimensionality reduction strategies:"><img alt="Feature agglomeration vs. univariate selection" src="../_images/sphx_glr_plot_feature_agglomeration_vs_univariate_selection_thumb.png" />
<p><a class="reference internal" href="cluster/plot_feature_agglomeration_vs_univariate_selection.html#sphx-glr-auto-examples-cluster-plot-feature-agglomeration-vs-univariate-selection-py"><span class="std std-ref">Feature agglomeration vs. univariate selection</span></a></p>
  <div class="sphx-glr-thumbnail-title">Feature agglomeration vs. univariate selection</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Example builds a swiss roll dataset and runs hierarchical clustering on their position."><img alt="Hierarchical clustering: structured vs unstructured ward" src="../_images/sphx_glr_plot_ward_structured_vs_unstructured_thumb.png" />
<p><a class="reference internal" href="cluster/plot_ward_structured_vs_unstructured.html#sphx-glr-auto-examples-cluster-plot-ward-structured-vs-unstructured-py"><span class="std std-ref">Hierarchical clustering: structured vs unstructured ward</span></a></p>
  <div class="sphx-glr-thumbnail-title">Hierarchical clustering: structured vs unstructured ward</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Clustering can be expensive, especially when our dataset contains millions of datapoints. Many ..."><img alt="Inductive Clustering" src="../_images/sphx_glr_plot_inductive_clustering_thumb.png" />
<p><a class="reference internal" href="cluster/plot_inductive_clustering.html#sphx-glr-auto-examples-cluster-plot-inductive-clustering-py"><span class="std std-ref">Inductive Clustering</span></a></p>
  <div class="sphx-glr-thumbnail-title">Inductive Clustering</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The plot shows:"><img alt="K-means Clustering" src="../_images/sphx_glr_plot_cluster_iris_thumb.png" />
<p><a class="reference internal" href="cluster/plot_cluster_iris.html#sphx-glr-auto-examples-cluster-plot-cluster-iris-py"><span class="std std-ref">K-means Clustering</span></a></p>
  <div class="sphx-glr-thumbnail-title">K-means Clustering</div>
</div><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..."><img alt="Online learning of a dictionary of parts of faces" src="../_images/sphx_glr_plot_dict_face_patches_thumb.png" />
<p><a class="reference internal" href="cluster/plot_dict_face_patches.html#sphx-glr-auto-examples-cluster-plot-dict-face-patches-py"><span class="std std-ref">Online learning of a dictionary of parts of faces</span></a></p>
  <div class="sphx-glr-thumbnail-title">Online learning of a dictionary of parts of faces</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot Hierarchical Clustering Dendrogram"><img alt="Plot Hierarchical Clustering Dendrogram" src="../_images/sphx_glr_plot_agglomerative_dendrogram_thumb.png" />
<p><a class="reference internal" href="cluster/plot_agglomerative_dendrogram.html#sphx-glr-auto-examples-cluster-plot-agglomerative-dendrogram-py"><span class="std std-ref">Plot Hierarchical Clustering Dendrogram</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot Hierarchical Clustering Dendrogram</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example uses spectral_clustering on a graph created from voxel-to-voxel difference on an i..."><img alt="Segmenting the picture of greek coins in regions" src="../_images/sphx_glr_plot_coin_segmentation_thumb.png" />
<p><a class="reference internal" href="cluster/plot_coin_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-segmentation-py"><span class="std std-ref">Segmenting the picture of greek coins in regions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Segmenting the picture of greek coins in regions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Silhouette analysis can be used to study the separation distance between the resulting clusters..."><img alt="Selecting the number of clusters with silhouette analysis on KMeans clustering" src="../_images/sphx_glr_plot_kmeans_silhouette_analysis_thumb.png" />
<p><a class="reference internal" href="cluster/plot_kmeans_silhouette_analysis.html#sphx-glr-auto-examples-cluster-plot-kmeans-silhouette-analysis-py"><span class="std std-ref">Selecting the number of clusters with silhouette analysis on KMeans clustering</span></a></p>
  <div class="sphx-glr-thumbnail-title">Selecting the number of clusters with silhouette analysis on KMeans clustering</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, an image with connected circles is generated and spectral clustering is used t..."><img alt="Spectral clustering for image segmentation" src="../_images/sphx_glr_plot_segmentation_toy_thumb.png" />
<p><a class="reference internal" href="cluster/plot_segmentation_toy.html#sphx-glr-auto-examples-cluster-plot-segmentation-toy-py"><span class="std std-ref">Spectral clustering for image segmentation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Spectral clustering for image segmentation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An illustration of various linkage option for agglomerative clustering on a 2D embedding of the..."><img alt="Various Agglomerative Clustering on a 2D embedding of digits" src="../_images/sphx_glr_plot_digits_linkage_thumb.png" />
<p><a class="reference internal" href="cluster/plot_digits_linkage.html#sphx-glr-auto-examples-cluster-plot-digits-linkage-py"><span class="std std-ref">Various Agglomerative Clustering on a 2D embedding of digits</span></a></p>
  <div class="sphx-glr-thumbnail-title">Various Agglomerative Clustering on a 2D embedding of digits</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how one can use KBinsDiscretizer to perform vector quantization on a set of ..."><img alt="Vector Quantization Example" src="../_images/sphx_glr_plot_face_compress_thumb.png" />
<p><a class="reference internal" href="cluster/plot_face_compress.html#sphx-glr-auto-examples-cluster-plot-face-compress-py"><span class="std std-ref">Vector Quantization Example</span></a></p>
  <div class="sphx-glr-thumbnail-title">Vector Quantization Example</div>
</div></div></section>
<section id="covariance-estimation">
<h2>Covariance estimation<a class="headerlink" href="#covariance-estimation" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.covariance" title="sklearn.covariance"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate can be regularized using shrinkage. Ledoit and..."><img alt="Ledoit-Wolf vs OAS estimation" src="../_images/sphx_glr_plot_lw_vs_oas_thumb.png" />
<p><a class="reference internal" href="covariance/plot_lw_vs_oas.html#sphx-glr-auto-examples-covariance-plot-lw-vs-oas-py"><span class="std std-ref">Ledoit-Wolf vs OAS estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Ledoit-Wolf vs OAS estimation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows covariance estimation with Mahalanobis distances on Gaussian distributed dat..."><img alt="Robust covariance estimation and Mahalanobis distances relevance" src="../_images/sphx_glr_plot_mahalanobis_distances_thumb.png" />
<p><a class="reference internal" href="covariance/plot_mahalanobis_distances.html#sphx-glr-auto-examples-covariance-plot-mahalanobis-distances-py"><span class="std std-ref">Robust covariance estimation and Mahalanobis distances relevance</span></a></p>
  <div class="sphx-glr-thumbnail-title">Robust covariance estimation and Mahalanobis distances relevance</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers ..."><img alt="Robust vs Empirical covariance estimate" src="../_images/sphx_glr_plot_robust_vs_empirical_covariance_thumb.png" />
<p><a class="reference internal" href="covariance/plot_robust_vs_empirical_covariance.html#sphx-glr-auto-examples-covariance-plot-robust-vs-empirical-covariance-py"><span class="std std-ref">Robust vs Empirical covariance estimate</span></a></p>
  <div class="sphx-glr-thumbnail-title">Robust vs Empirical covariance estimate</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="When working with covariance estimation, the usual approach is to use a maximum likelihood esti..."><img alt="Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood" src="../_images/sphx_glr_plot_covariance_estimation_thumb.png" />
<p><a class="reference internal" href="covariance/plot_covariance_estimation.html#sphx-glr-auto-examples-covariance-plot-covariance-estimation-py"><span class="std std-ref">Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood</span></a></p>
  <div class="sphx-glr-thumbnail-title">Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Using the GraphicalLasso estimator to learn a covariance and sparse precision from a small numb..."><img alt="Sparse inverse covariance estimation" src="../_images/sphx_glr_plot_sparse_cov_thumb.png" />
<p><a class="reference internal" href="covariance/plot_sparse_cov.html#sphx-glr-auto-examples-covariance-plot-sparse-cov-py"><span class="std std-ref">Sparse inverse covariance estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Sparse inverse covariance estimation</div>
</div></div></section>
<section id="cross-decomposition">
<h2>Cross decomposition<a class="headerlink" href="#cross-decomposition" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.cross_decomposition" title="sklearn.cross_decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cross_decomposition</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Simple usage of various cross decomposition algorithms:"><img alt="Compare cross decomposition methods" src="../_images/sphx_glr_plot_compare_cross_decomposition_thumb.png" />
<p><a class="reference internal" href="cross_decomposition/plot_compare_cross_decomposition.html#sphx-glr-auto-examples-cross-decomposition-plot-compare-cross-decomposition-py"><span class="std std-ref">Compare cross decomposition methods</span></a></p>
  <div class="sphx-glr-thumbnail-title">Compare cross decomposition methods</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example compares `Principal Component Regression &lt;https://en.wikipedia.org/wiki/Principal_..."><img alt="Principal Component Regression vs Partial Least Squares Regression" src="../_images/sphx_glr_plot_pcr_vs_pls_thumb.png" />
<p><a class="reference internal" href="cross_decomposition/plot_pcr_vs_pls.html#sphx-glr-auto-examples-cross-decomposition-plot-pcr-vs-pls-py"><span class="std std-ref">Principal Component Regression vs Partial Least Squares Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Principal Component Regression vs Partial Least Squares Regression</div>
</div></div></section>
<section id="dataset-examples">
<h2>Dataset examples<a class="headerlink" href="#dataset-examples" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example plots several randomly generated classification datasets. For easy visualization, ..."><img alt="Plot randomly generated classification dataset" src="../_images/sphx_glr_plot_random_dataset_thumb.png" />
<p><a class="reference internal" href="datasets/plot_random_dataset.html#sphx-glr-auto-examples-datasets-plot-random-dataset-py"><span class="std std-ref">Plot randomly generated classification dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot randomly generated classification dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This illustrates the make_multilabel_classification dataset generator. Each sample consists of ..."><img alt="Plot randomly generated multilabel dataset" src="../_images/sphx_glr_plot_random_multilabel_dataset_thumb.png" />
<p><a class="reference internal" href="datasets/plot_random_multilabel_dataset.html#sphx-glr-auto-examples-datasets-plot-random-multilabel-dataset-py"><span class="std std-ref">Plot randomly generated multilabel dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot randomly generated multilabel dataset</div>
</div><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-..."><img alt="The Digit Dataset" src="../_images/sphx_glr_plot_digits_last_image_thumb.png" />
<p><a class="reference internal" href="datasets/plot_digits_last_image.html#sphx-glr-auto-examples-datasets-plot-digits-last-image-py"><span class="std std-ref">The Digit Dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">The Digit Dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The rows being the samples and the columns being: Sepal Length, Sepal Width, Petal Length and P..."><img alt="The Iris Dataset" src="../_images/sphx_glr_plot_iris_dataset_thumb.png" />
<p><a class="reference internal" href="datasets/plot_iris_dataset.html#sphx-glr-auto-examples-datasets-plot-iris-dataset-py"><span class="std std-ref">The Iris Dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">The Iris Dataset</div>
</div></div></section>
<section id="decision-trees">
<h2>Decision Trees<a class="headerlink" href="#decision-trees" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="A 1D regression with decision tree."><img alt="Decision Tree Regression" src="../_images/sphx_glr_plot_tree_regression_thumb.png" />
<p><a class="reference internal" href="tree/plot_tree_regression.html#sphx-glr-auto-examples-tree-plot-tree-regression-py"><span class="std std-ref">Decision Tree Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Decision Tree Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example to illustrate multi-output regression with decision tree."><img alt="Multi-output Decision Tree Regression" src="../_images/sphx_glr_plot_tree_regression_multioutput_thumb.png" />
<p><a class="reference internal" href="tree/plot_tree_regression_multioutput.html#sphx-glr-auto-examples-tree-plot-tree-regression-multioutput-py"><span class="std std-ref">Multi-output Decision Tree Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multi-output Decision Tree Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surface of a decision tree trained on pairs of features of the iris dataset."><img alt="Plot the decision surface of decision trees trained on the iris dataset" src="../_images/sphx_glr_plot_iris_dtc_thumb.png" />
<p><a class="reference internal" href="tree/plot_iris_dtc.html#sphx-glr-auto-examples-tree-plot-iris-dtc-py"><span class="std std-ref">Plot the decision surface of decision trees trained on the iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot the decision surface of decision trees trained on the iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The DecisionTreeClassifier provides parameters such as min_samples_leaf and max_depth to preven..."><img alt="Post pruning decision trees with cost complexity pruning" src="../_images/sphx_glr_plot_cost_complexity_pruning_thumb.png" />
<p><a class="reference internal" href="tree/plot_cost_complexity_pruning.html#sphx-glr-auto-examples-tree-plot-cost-complexity-pruning-py"><span class="std std-ref">Post pruning decision trees with cost complexity pruning</span></a></p>
  <div class="sphx-glr-thumbnail-title">Post pruning decision trees with cost complexity pruning</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The decision tree structure can be analysed to gain further insight on the relation between the..."><img alt="Understanding the decision tree structure" src="../_images/sphx_glr_plot_unveil_tree_structure_thumb.png" />
<p><a class="reference internal" href="tree/plot_unveil_tree_structure.html#sphx-glr-auto-examples-tree-plot-unveil-tree-structure-py"><span class="std std-ref">Understanding the decision tree structure</span></a></p>
  <div class="sphx-glr-thumbnail-title">Understanding the decision tree structure</div>
</div></div></section>
<section id="decomposition">
<h2>Decomposition<a class="headerlink" href="#decomposition" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="A plot that compares the various Beta-divergence loss functions supported by the Multiplicative..."><img alt="Beta-divergence loss functions" src="../_images/sphx_glr_plot_beta_divergence_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_beta_divergence.html#sphx-glr-auto-examples-decomposition-plot-beta-divergence-py"><span class="std std-ref">Beta-divergence loss functions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Beta-divergence loss functions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example of estimating sources from noisy data."><img alt="Blind source separation using FastICA" src="../_images/sphx_glr_plot_ica_blind_source_separation_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_ica_blind_source_separation.html#sphx-glr-auto-examples-decomposition-plot-ica-blind-source-separation-py"><span class="std std-ref">Blind source separation using FastICA</span></a></p>
  <div class="sphx-glr-thumbnail-title">Blind source separation using FastICA</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The Iris dataset represents 3 kind of Iris flowers (Setosa, Versicolour and Virginica) with 4 a..."><img alt="Comparison of LDA and PCA 2D projection of Iris dataset" src="../_images/sphx_glr_plot_pca_vs_lda_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_pca_vs_lda.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-lda-py"><span class="std std-ref">Comparison of LDA and PCA 2D projection of Iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of LDA and PCA 2D projection of Iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example applies to olivetti_faces_dataset different unsupervised matrix decomposition (dim..."><img alt="Faces dataset decompositions" src="../_images/sphx_glr_plot_faces_decomposition_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_faces_decomposition.html#sphx-glr-auto-examples-decomposition-plot-faces-decomposition-py"><span class="std std-ref">Faces dataset decompositions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Faces dataset decompositions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Investigating the Iris dataset, we see that sepal length, petal length and petal width are high..."><img alt="Factor Analysis (with rotation) to visualize patterns" src="../_images/sphx_glr_plot_varimax_fa_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_varimax_fa.html#sphx-glr-auto-examples-decomposition-plot-varimax-fa-py"><span class="std std-ref">Factor Analysis (with rotation) to visualize patterns</span></a></p>
  <div class="sphx-glr-thumbnail-title">Factor Analysis (with rotation) to visualize patterns</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates visually in the feature space a comparison by results using two differ..."><img alt="FastICA on 2D point clouds" src="../_images/sphx_glr_plot_ica_vs_pca_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_ica_vs_pca.html#sphx-glr-auto-examples-decomposition-plot-ica-vs-pca-py"><span class="std std-ref">FastICA on 2D point clouds</span></a></p>
  <div class="sphx-glr-thumbnail-title">FastICA on 2D point clouds</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example comparing the effect of reconstructing noisy fragments of a raccoon face image using..."><img alt="Image denoising using dictionary learning" src="../_images/sphx_glr_plot_image_denoising_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_image_denoising.html#sphx-glr-auto-examples-decomposition-plot-image-denoising-py"><span class="std std-ref">Image denoising using dictionary learning</span></a></p>
  <div class="sphx-glr-thumbnail-title">Image denoising using dictionary learning</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Incremental principal component analysis (IPCA) is typically used as a replacement for principa..."><img alt="Incremental PCA" src="../_images/sphx_glr_plot_incremental_pca_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_incremental_pca.html#sphx-glr-auto-examples-decomposition-plot-incremental-pca-py"><span class="std std-ref">Incremental PCA</span></a></p>
  <div class="sphx-glr-thumbnail-title">Incremental PCA</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the difference between the Principal Components Analysis (:class:`~sklearn.d..."><img alt="Kernel PCA" src="../_images/sphx_glr_plot_kernel_pca_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_kernel_pca.html#sphx-glr-auto-examples-decomposition-plot-kernel-pca-py"><span class="std std-ref">Kernel PCA</span></a></p>
  <div class="sphx-glr-thumbnail-title">Kernel PCA</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Probabilistic PCA and Factor Analysis are probabilistic models. The consequence is that the lik..."><img alt="Model selection with Probabilistic PCA and Factor Analysis (FA)" src="../_images/sphx_glr_plot_pca_vs_fa_model_selection_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_pca_vs_fa_model_selection.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-fa-model-selection-py"><span class="std std-ref">Model selection with Probabilistic PCA and Factor Analysis (FA)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Model selection with Probabilistic PCA and Factor Analysis (FA)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Principal Component Analysis applied to the Iris dataset."><img alt="PCA example with Iris Data-set" src="../_images/sphx_glr_plot_pca_iris_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_pca_iris.html#sphx-glr-auto-examples-decomposition-plot-pca-iris-py"><span class="std std-ref">PCA example with Iris Data-set</span></a></p>
  <div class="sphx-glr-thumbnail-title">PCA example with Iris Data-set</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="These figures aid in illustrating how a point cloud can be very flat in one direction--which is..."><img alt="Principal components analysis (PCA)" src="../_images/sphx_glr_plot_pca_3d_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_pca_3d.html#sphx-glr-auto-examples-decomposition-plot-pca-3d-py"><span class="std std-ref">Principal components analysis (PCA)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Principal components analysis (PCA)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Transform a signal as a sparse combination of Ricker wavelets. This example visually compares d..."><img alt="Sparse coding with a precomputed dictionary" src="../_images/sphx_glr_plot_sparse_coding_thumb.png" />
<p><a class="reference internal" href="decomposition/plot_sparse_coding.html#sphx-glr-auto-examples-decomposition-plot-sparse-coding-py"><span class="std std-ref">Sparse coding with a precomputed dictionary</span></a></p>
  <div class="sphx-glr-thumbnail-title">Sparse coding with a precomputed dictionary</div>
</div></div></section>
<section id="ensemble-methods">
<h2>Ensemble methods<a class="headerlink" href="#ensemble-methods" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="In this example, we will compare the training times and prediction performances of HistGradient..."><img alt="Categorical Feature Support in Gradient Boosting" src="../_images/sphx_glr_plot_gradient_boosting_categorical_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_categorical.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-categorical-py"><span class="std std-ref">Categorical Feature Support in Gradient Boosting</span></a></p>
  <div class="sphx-glr-thumbnail-title">Categorical Feature Support in Gradient Boosting</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Stacking refers to a method to blend estimators. In this strategy, some estimators are individu..."><img alt="Combine predictors using stacking" src="../_images/sphx_glr_plot_stack_predictors_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_stack_predictors.html#sphx-glr-auto-examples-ensemble-plot-stack-predictors-py"><span class="std std-ref">Combine predictors using stacking</span></a></p>
  <div class="sphx-glr-thumbnail-title">Combine predictors using stacking</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example to compare multi-output regression with random forest and the multiclass meta-estima..."><img alt="Comparing random forests and the multi-output meta estimator" src="../_images/sphx_glr_plot_random_forest_regression_multioutput_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_random_forest_regression_multioutput.html#sphx-glr-auto-examples-ensemble-plot-random-forest-regression-multioutput-py"><span class="std std-ref">Comparing random forests and the multi-output meta estimator</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing random forests and the multi-output meta estimator</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A decision tree is boosted using the AdaBoost.R2 [1]_ algorithm on a 1D sinusoidal dataset with..."><img alt="Decision Tree Regression with AdaBoost" src="../_images/sphx_glr_plot_adaboost_regression_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_adaboost_regression.html#sphx-glr-auto-examples-ensemble-plot-adaboost-regression-py"><span class="std std-ref">Decision Tree Regression with AdaBoost</span></a></p>
  <div class="sphx-glr-thumbnail-title">Decision Tree Regression with AdaBoost</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This notebook is based on Figure 10.2 from Hastie et al 2009 [1]_ and illustrates the differenc..."><img alt="Discrete versus Real AdaBoost" src="../_images/sphx_glr_plot_adaboost_hastie_10_2_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_adaboost_hastie_10_2.html#sphx-glr-auto-examples-ensemble-plot-adaboost-hastie-10-2-py"><span class="std std-ref">Discrete versus Real AdaBoost</span></a></p>
  <div class="sphx-glr-thumbnail-title">Discrete versus Real AdaBoost</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Gradient boosting is an ensembling technique where several weak learners (regression trees) are..."><img alt="Early stopping of Gradient Boosting" src="../_images/sphx_glr_plot_gradient_boosting_early_stopping_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_early_stopping.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-early-stopping-py"><span class="std std-ref">Early stopping of Gradient Boosting</span></a></p>
  <div class="sphx-glr-thumbnail-title">Early stopping of Gradient Boosting</div>
</div><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..."><img alt="Feature importances with a forest of trees" src="../_images/sphx_glr_plot_forest_importances_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_forest_importances.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-py"><span class="std std-ref">Feature importances with a forest of trees</span></a></p>
  <div class="sphx-glr-thumbnail-title">Feature importances with a forest of trees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Transform your features into a higher dimensional, sparse space. Then train a linear model on t..."><img alt="Feature transformations with ensembles of trees" src="../_images/sphx_glr_plot_feature_transformation_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_feature_transformation.html#sphx-glr-auto-examples-ensemble-plot-feature-transformation-py"><span class="std std-ref">Feature transformations with ensembles of trees</span></a></p>
  <div class="sphx-glr-thumbnail-title">Feature transformations with ensembles of trees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Gradient Boosting Out-of-Bag estimates"><img alt="Gradient Boosting Out-of-Bag estimates" src="../_images/sphx_glr_plot_gradient_boosting_oob_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_oob.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-oob-py"><span class="std std-ref">Gradient Boosting Out-of-Bag estimates</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gradient Boosting Out-of-Bag estimates</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates Gradient Boosting to produce a predictive model from an ensemble of w..."><img alt="Gradient Boosting regression" src="../_images/sphx_glr_plot_gradient_boosting_regression_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_regression.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regression-py"><span class="std std-ref">Gradient Boosting regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gradient Boosting regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Illustration of the effect of different regularization strategies for Gradient Boosting. The ex..."><img alt="Gradient Boosting regularization" src="../_images/sphx_glr_plot_gradient_boosting_regularization_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_regularization.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regularization-py"><span class="std std-ref">Gradient Boosting regularization</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gradient Boosting regularization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="RandomTreesEmbedding provides a way to map data to a very high-dimensional, sparse representati..."><img alt="Hashing feature transformation using Totally Random Trees" src="../_images/sphx_glr_plot_random_forest_embedding_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_random_forest_embedding.html#sphx-glr-auto-examples-ensemble-plot-random-forest-embedding-py"><span class="std std-ref">Hashing feature transformation using Totally Random Trees</span></a></p>
  <div class="sphx-glr-thumbnail-title">Hashing feature transformation using Totally Random Trees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example using IsolationForest for anomaly detection."><img alt="IsolationForest example" src="../_images/sphx_glr_plot_isolation_forest_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_isolation_forest.html#sphx-glr-auto-examples-ensemble-plot-isolation-forest-py"><span class="std std-ref">IsolationForest example</span></a></p>
  <div class="sphx-glr-thumbnail-title">IsolationForest example</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of monotonic constraints on a gradient boosting estimator."><img alt="Monotonic Constraints" src="../_images/sphx_glr_plot_monotonic_constraints_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_monotonic_constraints.html#sphx-glr-auto-examples-ensemble-plot-monotonic-constraints-py"><span class="std std-ref">Monotonic Constraints</span></a></p>
  <div class="sphx-glr-thumbnail-title">Monotonic Constraints</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example reproduces Figure 1 of Zhu et al [1]_ and shows how boosting can improve predictio..."><img alt="Multi-class AdaBoosted Decision Trees" src="../_images/sphx_glr_plot_adaboost_multiclass_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_adaboost_multiclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-multiclass-py"><span class="std std-ref">Multi-class AdaBoosted Decision Trees</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multi-class AdaBoosted Decision Trees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The RandomForestClassifier is trained using *bootstrap aggregation*, where each new tree is fit..."><img alt="OOB Errors for Random Forests" src="../_images/sphx_glr_plot_ensemble_oob_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_ensemble_oob.html#sphx-glr-auto-examples-ensemble-plot-ensemble-oob-py"><span class="std std-ref">OOB Errors for Random Forests</span></a></p>
  <div class="sphx-glr-thumbnail-title">OOB Errors for Random Forests</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of a forest of trees to evaluate the impurity based importance of th..."><img alt="Pixel importances with a parallel forest of trees" src="../_images/sphx_glr_plot_forest_importances_faces_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_forest_importances_faces.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-faces-py"><span class="std std-ref">Pixel importances with a parallel forest of trees</span></a></p>
  <div class="sphx-glr-thumbnail-title">Pixel importances with a parallel forest of trees</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the class probabilities of the first sample in a toy dataset predicted by three different ..."><img alt="Plot class probabilities calculated by the VotingClassifier" src="../_images/sphx_glr_plot_voting_probas_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_voting_probas.html#sphx-glr-auto-examples-ensemble-plot-voting-probas-py"><span class="std std-ref">Plot class probabilities calculated by the VotingClassifier</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot class probabilities calculated by the VotingClassifier</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A voting regressor is an ensemble meta-estimator that fits several base regressors, each on the..."><img alt="Plot individual and voting regression predictions" src="../_images/sphx_glr_plot_voting_regressor_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_voting_regressor.html#sphx-glr-auto-examples-ensemble-plot-voting-regressor-py"><span class="std std-ref">Plot individual and voting regression predictions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot individual and voting regression predictions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the decision boundaries of a VotingClassifier for two features of the Iris dataset."><img alt="Plot the decision boundaries of a VotingClassifier" src="../_images/sphx_glr_plot_voting_decision_regions_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_voting_decision_regions.html#sphx-glr-auto-examples-ensemble-plot-voting-decision-regions-py"><span class="std std-ref">Plot the decision boundaries of a VotingClassifier</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot the decision boundaries of a VotingClassifier</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surfaces of forests of randomized trees trained on pairs of features of the i..."><img alt="Plot the decision surfaces of ensembles of trees on the iris dataset" src="../_images/sphx_glr_plot_forest_iris_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_forest_iris.html#sphx-glr-auto-examples-ensemble-plot-forest-iris-py"><span class="std std-ref">Plot the decision surfaces of ensembles of trees on the iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot the decision surfaces of ensembles of trees on the iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how quantile regression can be used to create prediction intervals."><img alt="Prediction Intervals for Gradient Boosting Regression" src="../_images/sphx_glr_plot_gradient_boosting_quantile_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_gradient_boosting_quantile.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-quantile-py"><span class="std std-ref">Prediction Intervals for Gradient Boosting Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Prediction Intervals for Gradient Boosting Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates and compares the bias-variance decomposition of the expected mean squa..."><img alt="Single estimator versus bagging: bias-variance decomposition" src="../_images/sphx_glr_plot_bias_variance_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_bias_variance.html#sphx-glr-auto-examples-ensemble-plot-bias-variance-py"><span class="std std-ref">Single estimator versus bagging: bias-variance decomposition</span></a></p>
  <div class="sphx-glr-thumbnail-title">Single estimator versus bagging: bias-variance decomposition</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example fits an AdaBoosted decision stump on a non-linearly separable classification datas..."><img alt="Two-class AdaBoost" src="../_images/sphx_glr_plot_adaboost_twoclass_thumb.png" />
<p><a class="reference internal" href="ensemble/plot_adaboost_twoclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-twoclass-py"><span class="std std-ref">Two-class AdaBoost</span></a></p>
  <div class="sphx-glr-thumbnail-title">Two-class AdaBoost</div>
</div></div></section>
<section id="examples-based-on-real-world-datasets">
<h2>Examples based on real world datasets<a class="headerlink" href="#examples-based-on-real-world-datasets" title="Permalink to this heading">¶</a></h2>
<p>Applications to real world problems with some medium sized datasets or
interactive user interface.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example shows the reconstruction of an image from a set of parallel projections, acquired ..."><img alt="Compressive sensing: tomography reconstruction with L1 prior (Lasso)" src="../_images/sphx_glr_plot_tomography_l1_reconstruction_thumb.png" />
<p><a class="reference internal" href="applications/plot_tomography_l1_reconstruction.html#sphx-glr-auto-examples-applications-plot-tomography-l1-reconstruction-py"><span class="std std-ref">Compressive sensing: tomography reconstruction with L1 prior (Lasso)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Compressive sensing: tomography reconstruction with L1 prior (Lasso)</div>
</div><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;, ..."><img alt="Faces recognition example using eigenfaces and SVMs" src="../_images/sphx_glr_plot_face_recognition_thumb.png" />
<p><a class="reference internal" href="applications/plot_face_recognition.html#sphx-glr-auto-examples-applications-plot-face-recognition-py"><span class="std std-ref">Faces recognition example using eigenfaces and SVMs</span></a></p>
  <div class="sphx-glr-thumbnail-title">Faces recognition example using eigenfaces and SVMs</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use KernelPCA to denoise images. In short, we take advantage of the a..."><img alt="Image denoising using kernel PCA" src="../_images/sphx_glr_plot_digits_denoising_thumb.png" />
<p><a class="reference internal" href="applications/plot_digits_denoising.html#sphx-glr-auto-examples-applications-plot-digits-denoising-py"><span class="std std-ref">Image denoising using kernel PCA</span></a></p>
  <div class="sphx-glr-thumbnail-title">Image denoising using kernel PCA</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create da..."><img alt="Libsvm GUI" src="../_images/sphx_glr_svm_gui_thumb.png" />
<p><a class="reference internal" href="applications/svm_gui.html#sphx-glr-auto-examples-applications-svm-gui-py"><span class="std std-ref">Libsvm GUI</span></a></p>
  <div class="sphx-glr-thumbnail-title">Libsvm GUI</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Demonstrate how model complexity influences both prediction accuracy and computational performa..."><img alt="Model Complexity Influence" src="../_images/sphx_glr_plot_model_complexity_influence_thumb.png" />
<p><a class="reference internal" href="applications/plot_model_complexity_influence.html#sphx-glr-auto-examples-applications-plot-model-complexity-influence-py"><span class="std std-ref">Model Complexity Influence</span></a></p>
  <div class="sphx-glr-thumbnail-title">Model Complexity Influence</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used for classification using an out-of-core..."><img alt="Out-of-core classification of text documents" src="../_images/sphx_glr_plot_out_of_core_classification_thumb.png" />
<p><a class="reference internal" href="applications/plot_out_of_core_classification.html#sphx-glr-auto-examples-applications-plot-out-of-core-classification-py"><span class="std std-ref">Out-of-core classification of text documents</span></a></p>
  <div class="sphx-glr-thumbnail-title">Out-of-core classification of text documents</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the need for robust covariance estimation on a real data set. It is us..."><img alt="Outlier detection on a real data set" src="../_images/sphx_glr_plot_outlier_detection_wine_thumb.png" />
<p><a class="reference internal" href="applications/plot_outlier_detection_wine.html#sphx-glr-auto-examples-applications-plot-outlier-detection-wine-py"><span class="std std-ref">Outlier detection on a real data set</span></a></p>
  <div class="sphx-glr-thumbnail-title">Outlier detection on a real data set</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This is an example showing the prediction latency of various scikit-learn estimators."><img alt="Prediction Latency" src="../_images/sphx_glr_plot_prediction_latency_thumb.png" />
<p><a class="reference internal" href="applications/plot_prediction_latency.html#sphx-glr-auto-examples-applications-plot-prediction-latency-py"><span class="std std-ref">Prediction Latency</span></a></p>
  <div class="sphx-glr-thumbnail-title">Prediction Latency</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Modeling species&#x27; geographic distributions is an important problem in conservation biology. In ..."><img alt="Species distribution modeling" src="../_images/sphx_glr_plot_species_distribution_modeling_thumb.png" />
<p><a class="reference internal" href="applications/plot_species_distribution_modeling.html#sphx-glr-auto-examples-applications-plot-species-distribution-modeling-py"><span class="std std-ref">Species distribution modeling</span></a></p>
  <div class="sphx-glr-thumbnail-title">Species distribution modeling</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This notebook introduces different strategies to leverage time-related features for a bike shar..."><img alt="Time-related feature engineering" src="../_images/sphx_glr_plot_cyclical_feature_engineering_thumb.png" />
<p><a class="reference internal" href="applications/plot_cyclical_feature_engineering.html#sphx-glr-auto-examples-applications-plot-cyclical-feature-engineering-py"><span class="std std-ref">Time-related feature engineering</span></a></p>
  <div class="sphx-glr-thumbnail-title">Time-related feature engineering</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This is an example of applying NMF and LatentDirichletAllocation on a corpus of documents and e..."><img alt="Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation" src="../_images/sphx_glr_plot_topics_extraction_with_nmf_lda_thumb.png" />
<p><a class="reference internal" href="applications/plot_topics_extraction_with_nmf_lda.html#sphx-glr-auto-examples-applications-plot-topics-extraction-with-nmf-lda-py"><span class="std std-ref">Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example employs several unsupervised learning techniques to extract the stock market struc..."><img alt="Visualizing the stock market structure" src="../_images/sphx_glr_plot_stock_market_thumb.png" />
<p><a class="reference internal" href="applications/plot_stock_market.html#sphx-glr-auto-examples-applications-plot-stock-market-py"><span class="std std-ref">Visualizing the stock market structure</span></a></p>
  <div class="sphx-glr-thumbnail-title">Visualizing the stock market structure</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A classical way to assert the relative importance of vertices in a graph is to compute the prin..."><img alt="Wikipedia principal eigenvector" src="../_images/sphx_glr_wikipedia_principal_eigenvector_thumb.png" />
<p><a class="reference internal" href="applications/wikipedia_principal_eigenvector.html#sphx-glr-auto-examples-applications-wikipedia-principal-eigenvector-py"><span class="std std-ref">Wikipedia principal eigenvector</span></a></p>
  <div class="sphx-glr-thumbnail-title">Wikipedia principal eigenvector</div>
</div></div></section>
<section id="feature-selection">
<h2>Feature Selection<a class="headerlink" href="#feature-selection" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.feature_selection" title="sklearn.feature_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the differences between univariate F-test statistics and mutual inform..."><img alt="Comparison of F-test and mutual information" src="../_images/sphx_glr_plot_f_test_vs_mi_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_f_test_vs_mi.html#sphx-glr-auto-examples-feature-selection-plot-f-test-vs-mi-py"><span class="std std-ref">Comparison of F-test and mutual information</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of F-test and mutual information</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates and compares two approaches for feature selection: SelectFromModel whi..."><img alt="Model-based and sequential feature selection" src="../_images/sphx_glr_plot_select_from_model_diabetes_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_select_from_model_diabetes.html#sphx-glr-auto-examples-feature-selection-plot-select-from-model-diabetes-py"><span class="std std-ref">Model-based and sequential feature selection</span></a></p>
  <div class="sphx-glr-thumbnail-title">Model-based and sequential feature selection</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how a feature selection can be easily integrated within a machine learning p..."><img alt="Pipeline ANOVA SVM" src="../_images/sphx_glr_plot_feature_selection_pipeline_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_feature_selection_pipeline.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-pipeline-py"><span class="std std-ref">Pipeline ANOVA SVM</span></a></p>
  <div class="sphx-glr-thumbnail-title">Pipeline ANOVA SVM</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A recursive feature elimination example showing the relevance of pixels in a digit classificati..."><img alt="Recursive feature elimination" src="../_images/sphx_glr_plot_rfe_digits_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_rfe_digits.html#sphx-glr-auto-examples-feature-selection-plot-rfe-digits-py"><span class="std std-ref">Recursive feature elimination</span></a></p>
  <div class="sphx-glr-thumbnail-title">Recursive feature elimination</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A Recursive Feature Elimination (RFE) example with automatic tuning of the number of features s..."><img alt="Recursive feature elimination with cross-validation" src="../_images/sphx_glr_plot_rfe_with_cross_validation_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_rfe_with_cross_validation.html#sphx-glr-auto-examples-feature-selection-plot-rfe-with-cross-validation-py"><span class="std std-ref">Recursive feature elimination with cross-validation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Recursive feature elimination with cross-validation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This notebook is an example of using univariate feature selection to improve classification acc..."><img alt="Univariate Feature Selection" src="../_images/sphx_glr_plot_feature_selection_thumb.png" />
<p><a class="reference internal" href="feature_selection/plot_feature_selection.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-py"><span class="std std-ref">Univariate Feature Selection</span></a></p>
  <div class="sphx-glr-thumbnail-title">Univariate Feature Selection</div>
</div></div></section>
<section id="gaussian-mixture-models">
<h2>Gaussian Mixture Models<a class="headerlink" href="#gaussian-mixture-models" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.mixture" title="sklearn.mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example plots the ellipsoids obtained from a toy dataset (mixture of three Gaussians) fitt..."><img alt="Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture" src="../_images/sphx_glr_plot_concentration_prior_thumb.png" />
<p><a class="reference internal" href="mixture/plot_concentration_prior.html#sphx-glr-auto-examples-mixture-plot-concentration-prior-py"><span class="std std-ref">Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture</span></a></p>
  <div class="sphx-glr-thumbnail-title">Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the density estimation of a mixture of two Gaussians. Data is generated from two Gaussians..."><img alt="Density Estimation for a Gaussian mixture" src="../_images/sphx_glr_plot_gmm_pdf_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm_pdf.html#sphx-glr-auto-examples-mixture-plot-gmm-pdf-py"><span class="std std-ref">Density Estimation for a Gaussian mixture</span></a></p>
  <div class="sphx-glr-thumbnail-title">Density Estimation for a Gaussian mixture</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Examples of the different methods of initialization in Gaussian Mixture Models"><img alt="GMM Initialization Methods" src="../_images/sphx_glr_plot_gmm_init_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm_init.html#sphx-glr-auto-examples-mixture-plot-gmm-init-py"><span class="std std-ref">GMM Initialization Methods</span></a></p>
  <div class="sphx-glr-thumbnail-title">GMM Initialization Methods</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Demonstration of several covariances types for Gaussian mixture models."><img alt="GMM covariances" src="../_images/sphx_glr_plot_gmm_covariances_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm_covariances.html#sphx-glr-auto-examples-mixture-plot-gmm-covariances-py"><span class="std std-ref">GMM covariances</span></a></p>
  <div class="sphx-glr-thumbnail-title">GMM covariances</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the confidence ellipsoids of a mixture of two Gaussians obtained with Expectation Maximisa..."><img alt="Gaussian Mixture Model Ellipsoids" src="../_images/sphx_glr_plot_gmm_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm.html#sphx-glr-auto-examples-mixture-plot-gmm-py"><span class="std std-ref">Gaussian Mixture Model Ellipsoids</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Ellipsoids</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows that model selection can be performed with Gaussian Mixture Models (GMM) usi..."><img alt="Gaussian Mixture Model Selection" src="../_images/sphx_glr_plot_gmm_selection_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm_selection.html#sphx-glr-auto-examples-mixture-plot-gmm-selection-py"><span class="std std-ref">Gaussian Mixture Model Selection</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Selection</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the behavior of Gaussian mixture models fit on data that was not samp..."><img alt="Gaussian Mixture Model Sine Curve" src="../_images/sphx_glr_plot_gmm_sin_thumb.png" />
<p><a class="reference internal" href="mixture/plot_gmm_sin.html#sphx-glr-auto-examples-mixture-plot-gmm-sin-py"><span class="std std-ref">Gaussian Mixture Model Sine Curve</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian Mixture Model Sine Curve</div>
</div></div></section>
<section id="gaussian-process-for-machine-learning">
<h2>Gaussian Process for Machine Learning<a class="headerlink" href="#gaussian-process-for-machine-learning" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.gaussian_process" title="sklearn.gaussian_process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates differences between a kernel ridge regression and a Gaussian process r..."><img alt="Comparison of kernel ridge and Gaussian process regression" src="../_images/sphx_glr_plot_compare_gpr_krr_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_compare_gpr_krr.html#sphx-glr-auto-examples-gaussian-process-plot-compare-gpr-krr-py"><span class="std std-ref">Comparison of kernel ridge and Gaussian process regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of kernel ridge and Gaussian process regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A simple one-dimensional regression example computed in two different ways:"><img alt="Gaussian Processes regression: basic introductory example" src="../_images/sphx_glr_plot_gpr_noisy_targets_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpr_noisy_targets.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-targets-py"><span class="std std-ref">Gaussian Processes regression: basic introductory example</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian Processes regression: basic introductory example</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an isotropic and anisotropic RBF ..."><img alt="Gaussian process classification (GPC) on iris dataset" src="../_images/sphx_glr_plot_gpc_iris_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpc_iris.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-iris-py"><span class="std std-ref">Gaussian process classification (GPC) on iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian process classification (GPC) on iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example is based on Section 5.4.3 of &quot;Gaussian Processes for Machine Learning&quot; [RW2006]_. ..."><img alt="Gaussian process regression (GPR) on Mauna Loa CO2 data" src="../_images/sphx_glr_plot_gpr_co2_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpr_co2.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-co2-py"><span class="std std-ref">Gaussian process regression (GPR) on Mauna Loa CO2 data</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian process regression (GPR) on Mauna Loa CO2 data</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the ability of the WhiteKernel to estimate the noise level in the data. More..."><img alt="Gaussian process regression (GPR) with noise-level estimation" src="../_images/sphx_glr_plot_gpr_noisy_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpr_noisy.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-py"><span class="std std-ref">Gaussian process regression (GPR) with noise-level estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian process regression (GPR) with noise-level estimation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Gaussian processes for regression and classification tasks ..."><img alt="Gaussian processes on discrete data structures" src="../_images/sphx_glr_plot_gpr_on_structured_data_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpr_on_structured_data.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-on-structured-data-py"><span class="std std-ref">Gaussian processes on discrete data structures</span></a></p>
  <div class="sphx-glr-thumbnail-title">Gaussian processes on discrete data structures</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates GPC on XOR data. Compared are a stationary, isotropic kernel (RBF) and..."><img alt="Illustration of Gaussian process classification (GPC) on the XOR dataset" src="../_images/sphx_glr_plot_gpc_xor_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpc_xor.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-xor-py"><span class="std std-ref">Illustration of Gaussian process classification (GPC) on the XOR dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Illustration of Gaussian process classification (GPC) on the XOR dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the prior and posterior of a GaussianProcessRegressor with different k..."><img alt="Illustration of prior and posterior Gaussian process for different kernels" src="../_images/sphx_glr_plot_gpr_prior_posterior_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpr_prior_posterior.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-prior-posterior-py"><span class="std std-ref">Illustration of prior and posterior Gaussian process for different kernels</span></a></p>
  <div class="sphx-glr-thumbnail-title">Illustration of prior and posterior Gaussian process for different kernels</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A two-dimensional classification example showing iso-probability lines for the predicted probab..."><img alt="Iso-probability lines for Gaussian Processes classification (GPC)" src="../_images/sphx_glr_plot_gpc_isoprobability_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpc_isoprobability.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-isoprobability-py"><span class="std std-ref">Iso-probability lines for Gaussian Processes classification (GPC)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Iso-probability lines for Gaussian Processes classification (GPC)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an RBF kernel with different choi..."><img alt="Probabilistic predictions with Gaussian process classification (GPC)" src="../_images/sphx_glr_plot_gpc_thumb.png" />
<p><a class="reference internal" href="gaussian_process/plot_gpc.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-py"><span class="std std-ref">Probabilistic predictions with Gaussian process classification (GPC)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Probabilistic predictions with Gaussian process classification (GPC)</div>
</div></div></section>
<section id="generalized-linear-models">
<h2>Generalized Linear Models<a class="headerlink" href="#generalized-linear-models" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example compares two different bayesian regressors:"><img alt="Comparing Linear Bayesian Regressors" src="../_images/sphx_glr_plot_ard_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ard.html#sphx-glr-auto-examples-linear-model-plot-ard-py"><span class="std std-ref">Comparing Linear Bayesian Regressors</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing Linear Bayesian Regressors</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Comparing various online solvers"><img alt="Comparing various online solvers" src="../_images/sphx_glr_plot_sgd_comparison_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_comparison.html#sphx-glr-auto-examples-linear-model-plot-sgd-comparison-py"><span class="std std-ref">Comparing various online solvers</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing various online solvers</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Computes a Bayesian Ridge Regression of Sinusoids."><img alt="Curve Fitting with Bayesian Ridge Regression" src="../_images/sphx_glr_plot_bayesian_ridge_curvefit_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_bayesian_ridge_curvefit.html#sphx-glr-auto-examples-linear-model-plot-bayesian-ridge-curvefit-py"><span class="std std-ref">Curve Fitting with Bayesian Ridge Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Curve Fitting with Bayesian Ridge Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Stochastic Gradient Descent is an optimization technique which minimizes a loss function in a s..."><img alt="Early stopping of Stochastic Gradient Descent" src="../_images/sphx_glr_plot_sgd_early_stopping_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_early_stopping.html#sphx-glr-auto-examples-linear-model-plot-sgd-early-stopping-py"><span class="std std-ref">Early stopping of Stochastic Gradient Descent</span></a></p>
  <div class="sphx-glr-thumbnail-title">Early stopping of Stochastic Gradient Descent</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The following example shows how to precompute the gram matrix while using weighted samples with..."><img alt="Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples" src="../_images/sphx_glr_plot_elastic_net_precomputed_gram_matrix_with_weighted_samples_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_elastic_net_precomputed_gram_matrix_with_weighted_samples.html#sphx-glr-auto-examples-linear-model-plot-elastic-net-precomputed-gram-matrix-with-weighted-samples-py"><span class="std std-ref">Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples</span></a></p>
  <div class="sphx-glr-thumbnail-title">Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Fit Ridge and HuberRegressor on a dataset with outliers."><img alt="HuberRegressor vs Ridge on dataset with strong outliers" src="../_images/sphx_glr_plot_huber_vs_ridge_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_huber_vs_ridge.html#sphx-glr-auto-examples-linear-model-plot-huber-vs-ridge-py"><span class="std std-ref">HuberRegressor vs Ridge on dataset with strong outliers</span></a></p>
  <div class="sphx-glr-thumbnail-title">HuberRegressor vs Ridge on dataset with strong outliers</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The multi-task lasso allows to fit multiple regression problems jointly enforcing the selected ..."><img alt="Joint feature selection with multi-task Lasso" src="../_images/sphx_glr_plot_multi_task_lasso_support_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_multi_task_lasso_support.html#sphx-glr-auto-examples-linear-model-plot-multi-task-lasso-support-py"><span class="std std-ref">Joint feature selection with multi-task Lasso</span></a></p>
  <div class="sphx-glr-thumbnail-title">Joint feature selection with multi-task Lasso</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Comparison of the sparsity (percentage of zero coefficients) of solutions when L1, L2 and Elast..."><img alt="L1 Penalty and Sparsity in Logistic Regression" src="../_images/sphx_glr_plot_logistic_l1_l2_sparsity_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_logistic_l1_l2_sparsity.html#sphx-glr-auto-examples-linear-model-plot-logistic-l1-l2-sparsity-py"><span class="std std-ref">L1 Penalty and Sparsity in Logistic Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">L1 Penalty and Sparsity in Logistic Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent."><img alt="Lasso and Elastic Net" src="../_images/sphx_glr_plot_lasso_coordinate_descent_path_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_coordinate_descent_path.html#sphx-glr-auto-examples-linear-model-plot-lasso-coordinate-descent-path-py"><span class="std std-ref">Lasso and Elastic Net</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso and Elastic Net</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Estimates Lasso and Elastic-Net regression models on a manually generated sparse signal corrupt..."><img alt="Lasso and Elastic Net for Sparse Signals" src="../_images/sphx_glr_plot_lasso_and_elasticnet_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_and_elasticnet.html#sphx-glr-auto-examples-linear-model-plot-lasso-and-elasticnet-py"><span class="std std-ref">Lasso and Elastic Net for Sparse Signals</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso and Elastic Net for Sparse Signals</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example reproduces the example of Fig. 2 of [ZHT2007]_. A LassoLarsIC estimator is fit on ..."><img alt="Lasso model selection via information criteria" src="../_images/sphx_glr_plot_lasso_lars_ic_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_lars_ic.html#sphx-glr-auto-examples-linear-model-plot-lasso-lars-ic-py"><span class="std std-ref">Lasso model selection via information criteria</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso model selection via information criteria</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example focuses on model selection for Lasso models that are linear models with an L1 pena..."><img alt="Lasso model selection: AIC-BIC / cross-validation" src="../_images/sphx_glr_plot_lasso_model_selection_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_model_selection.html#sphx-glr-auto-examples-linear-model-plot-lasso-model-selection-py"><span class="std std-ref">Lasso model selection: AIC-BIC / cross-validation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso model selection: AIC-BIC / cross-validation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We show that linear_model.Lasso provides the same results for dense and sparse data and that in..."><img alt="Lasso on dense and sparse data" src="../_images/sphx_glr_plot_lasso_dense_vs_sparse_data_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_dense_vs_sparse_data.html#sphx-glr-auto-examples-linear-model-plot-lasso-dense-vs-sparse-data-py"><span class="std std-ref">Lasso on dense and sparse data</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso on dense and sparse data</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Computes Lasso Path along the regularization parameter using the LARS algorithm on the diabetes..."><img alt="Lasso path using LARS" src="../_images/sphx_glr_plot_lasso_lars_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_lasso_lars.html#sphx-glr-auto-examples-linear-model-plot-lasso-lars-py"><span class="std std-ref">Lasso path using LARS</span></a></p>
  <div class="sphx-glr-thumbnail-title">Lasso path using LARS</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The coefficients, residual sum of squares and the coefficient of determination are also calcula..."><img alt="Linear Regression Example" src="../_images/sphx_glr_plot_ols_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py"><span class="std std-ref">Linear Regression Example</span></a></p>
  <div class="sphx-glr-thumbnail-title">Linear Regression Example</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Show below is a logistic-regression classifiers decision boundaries on the first two dimensions..."><img alt="Logistic Regression 3-class Classifier" src="../_images/sphx_glr_plot_iris_logistic_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_iris_logistic.html#sphx-glr-auto-examples-linear-model-plot-iris-logistic-py"><span class="std std-ref">Logistic Regression 3-class Classifier</span></a></p>
  <div class="sphx-glr-thumbnail-title">Logistic Regression 3-class Classifier</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Shown in the plot is how the logistic regression would, in this synthetic dataset, classify val..."><img alt="Logistic function" src="../_images/sphx_glr_plot_logistic_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_logistic.html#sphx-glr-auto-examples-linear-model-plot-logistic-py"><span class="std std-ref">Logistic function</span></a></p>
  <div class="sphx-glr-thumbnail-title">Logistic function</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Here we fit a multinomial logistic regression with L1 penalty on a subset of the MNIST digits c..."><img alt="MNIST classification using multinomial logistic + L1" src="../_images/sphx_glr_plot_sparse_logistic_regression_mnist_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sparse_logistic_regression_mnist.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-mnist-py"><span class="std std-ref">MNIST classification using multinomial logistic + L1</span></a></p>
  <div class="sphx-glr-thumbnail-title">MNIST classification using multinomial logistic + L1</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Comparison of multinomial logistic L1 vs one-versus-rest L1 logistic regression to classify doc..."><img alt="Multiclass sparse logistic regression on 20newgroups" src="../_images/sphx_glr_plot_sparse_logistic_regression_20newsgroups_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sparse_logistic_regression_20newsgroups.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-20newsgroups-py"><span class="std std-ref">Multiclass sparse logistic regression on 20newgroups</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multiclass sparse logistic regression on 20newgroups</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we fit a linear model with positive constraints on the regression coefficients..."><img alt="Non-negative least squares" src="../_images/sphx_glr_plot_nnls_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_nnls.html#sphx-glr-auto-examples-linear-model-plot-nnls-py"><span class="std std-ref">Non-negative least squares</span></a></p>
  <div class="sphx-glr-thumbnail-title">Non-negative least squares</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how to approximate the solution of sklearn.svm.OneClassSVM in the case of an..."><img alt="One-Class SVM versus One-Class SVM using Stochastic Gradient Descent" src="../_images/sphx_glr_plot_sgdocsvm_vs_ocsvm_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgdocsvm_vs_ocsvm.html#sphx-glr-auto-examples-linear-model-plot-sgdocsvm-vs-ocsvm-py"><span class="std std-ref">One-Class SVM versus One-Class SVM using Stochastic Gradient Descent</span></a></p>
  <div class="sphx-glr-thumbnail-title">One-Class SVM versus One-Class SVM using Stochastic Gradient Descent</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Ridge regression is basically minimizing a penalised version of the least-squared function. The..."><img alt="Ordinary Least Squares and Ridge Regression Variance" src="../_images/sphx_glr_plot_ols_ridge_variance_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ols_ridge_variance.html#sphx-glr-auto-examples-linear-model-plot-ols-ridge-variance-py"><span class="std std-ref">Ordinary Least Squares and Ridge Regression Variance</span></a></p>
  <div class="sphx-glr-thumbnail-title">Ordinary Least Squares and Ridge Regression Variance</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Using orthogonal matching pursuit for recovering a sparse signal from a noisy measurement encod..."><img alt="Orthogonal Matching Pursuit" src="../_images/sphx_glr_plot_omp_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_omp.html#sphx-glr-auto-examples-linear-model-plot-omp-py"><span class="std std-ref">Orthogonal Matching Pursuit</span></a></p>
  <div class="sphx-glr-thumbnail-title">Orthogonal Matching Pursuit</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Ridge Regression is the estimator used in this example. Each color in the left plot represents ..."><img alt="Plot Ridge coefficients as a function of the L2 regularization" src="../_images/sphx_glr_plot_ridge_coeffs_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ridge_coeffs.html#sphx-glr-auto-examples-linear-model-plot-ridge-coeffs-py"><span class="std std-ref">Plot Ridge coefficients as a function of the L2 regularization</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot Ridge coefficients as a function of the L2 regularization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Shows the effect of collinearity in the coefficients of an estimator."><img alt="Plot Ridge coefficients as a function of the regularization" src="../_images/sphx_glr_plot_ridge_path_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ridge_path.html#sphx-glr-auto-examples-linear-model-plot-ridge-path-py"><span class="std std-ref">Plot Ridge coefficients as a function of the regularization</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot Ridge coefficients as a function of the regularization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multi-class SGD on iris dataset. The hyperplanes corresponding to the ..."><img alt="Plot multi-class SGD on the iris dataset" src="../_images/sphx_glr_plot_sgd_iris_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_iris.html#sphx-glr-auto-examples-linear-model-plot-sgd-iris-py"><span class="std std-ref">Plot multi-class SGD on the iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot multi-class SGD on the iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multinomial and One-vs-Rest Logistic Regression. The hyperplanes corre..."><img alt="Plot multinomial and One-vs-Rest Logistic Regression" src="../_images/sphx_glr_plot_logistic_multinomial_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_logistic_multinomial.html#sphx-glr-auto-examples-linear-model-plot-logistic-multinomial-py"><span class="std std-ref">Plot multinomial and One-vs-Rest Logistic Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot multinomial and One-vs-Rest Logistic Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of log-linear Poisson regression on the `French Motor Third-Pa..."><img alt="Poisson regression and non-normal loss" src="../_images/sphx_glr_plot_poisson_regression_non_normal_loss_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_poisson_regression_non_normal_loss.html#sphx-glr-auto-examples-linear-model-plot-poisson-regression-non-normal-loss-py"><span class="std std-ref">Poisson regression and non-normal loss</span></a></p>
  <div class="sphx-glr-thumbnail-title">Poisson regression and non-normal loss</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to approximate a function with polynomials up to degree degree by..."><img alt="Polynomial and Spline interpolation" src="../_images/sphx_glr_plot_polynomial_interpolation_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_polynomial_interpolation.html#sphx-glr-auto-examples-linear-model-plot-polynomial-interpolation-py"><span class="std std-ref">Polynomial and Spline interpolation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Polynomial and Spline interpolation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how quantile regression can predict non-trivial conditional quantiles."><img alt="Quantile regression" src="../_images/sphx_glr_plot_quantile_regression_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_quantile_regression.html#sphx-glr-auto-examples-linear-model-plot-quantile-regression-py"><span class="std std-ref">Quantile regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Quantile regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip=" Train l1-penalized logistic regression models on a binary classification problem derived from ..."><img alt="Regularization path of L1- Logistic Regression" src="../_images/sphx_glr_plot_logistic_path_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_logistic_path.html#sphx-glr-auto-examples-linear-model-plot-logistic-path-py"><span class="std std-ref">Regularization path of L1- Logistic Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Regularization path of L1- Logistic Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Here a sine function is fit with a polynomial of order 3, for values close to zero."><img alt="Robust linear estimator fitting" src="../_images/sphx_glr_plot_robust_fit_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_robust_fit.html#sphx-glr-auto-examples-linear-model-plot-robust-fit-py"><span class="std std-ref">Robust linear estimator fitting</span></a></p>
  <div class="sphx-glr-thumbnail-title">Robust linear estimator fitting</div>
</div><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..."><img alt="Robust linear model estimation using RANSAC" src="../_images/sphx_glr_plot_ransac_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ransac.html#sphx-glr-auto-examples-linear-model-plot-ransac-py"><span class="std std-ref">Robust linear model estimation using RANSAC</span></a></p>
  <div class="sphx-glr-thumbnail-title">Robust linear model estimation using RANSAC</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a line..."><img alt="SGD: Maximum margin separating hyperplane" src="../_images/sphx_glr_plot_sgd_separating_hyperplane_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_separating_hyperplane.html#sphx-glr-auto-examples-linear-model-plot-sgd-separating-hyperplane-py"><span class="std std-ref">SGD: Maximum margin separating hyperplane</span></a></p>
  <div class="sphx-glr-thumbnail-title">SGD: Maximum margin separating hyperplane</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Contours of where the penalty is equal to 1 for the three penalties L1, L2 and elastic-net."><img alt="SGD: Penalties" src="../_images/sphx_glr_plot_sgd_penalties_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_penalties.html#sphx-glr-auto-examples-linear-model-plot-sgd-penalties-py"><span class="std std-ref">SGD: Penalties</span></a></p>
  <div class="sphx-glr-thumbnail-title">SGD: Penalties</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w..."><img alt="SGD: Weighted samples" src="../_images/sphx_glr_plot_sgd_weighted_samples_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_weighted_samples.html#sphx-glr-auto-examples-linear-model-plot-sgd-weighted-samples-py"><span class="std std-ref">SGD: Weighted samples</span></a></p>
  <div class="sphx-glr-thumbnail-title">SGD: Weighted samples</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A plot that compares the various convex loss functions supported by SGDClassifier ."><img alt="SGD: convex loss functions" src="../_images/sphx_glr_plot_sgd_loss_functions_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_sgd_loss_functions.html#sphx-glr-auto-examples-linear-model-plot-sgd-loss-functions-py"><span class="std std-ref">SGD: convex loss functions</span></a></p>
  <div class="sphx-glr-thumbnail-title">SGD: convex loss functions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Features 1 and 2 of the diabetes-dataset are fitted and plotted below. It illustrates that alth..."><img alt="Sparsity Example: Fitting only features 1  and 2" src="../_images/sphx_glr_plot_ols_3d_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_ols_3d.html#sphx-glr-auto-examples-linear-model-plot-ols-3d-py"><span class="std std-ref">Sparsity Example: Fitting only features 1  and 2</span></a></p>
  <div class="sphx-glr-thumbnail-title">Sparsity Example: Fitting only features 1  and 2</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Computes a Theil-Sen Regression on a synthetic dataset."><img alt="Theil-Sen Regression" src="../_images/sphx_glr_plot_theilsen_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_theilsen.html#sphx-glr-auto-examples-linear-model-plot-theilsen-py"><span class="std std-ref">Theil-Sen Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Theil-Sen Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Poisson, Gamma and Tweedie regression on the `French Motor ..."><img alt="Tweedie regression on insurance claims" src="../_images/sphx_glr_plot_tweedie_regression_insurance_claims_thumb.png" />
<p><a class="reference internal" href="linear_model/plot_tweedie_regression_insurance_claims.html#sphx-glr-auto-examples-linear-model-plot-tweedie-regression-insurance-claims-py"><span class="std std-ref">Tweedie regression on insurance claims</span></a></p>
  <div class="sphx-glr-thumbnail-title">Tweedie regression on insurance claims</div>
</div></div></section>
<section id="inspection">
<h2>Inspection<a class="headerlink" href="#inspection" title="Permalink to this heading">¶</a></h2>
<p>Examples related to the <a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="In linear models, the target value is modeled as a linear combination of the features (see the ..."><img alt="Common pitfalls in the interpretation of coefficients of linear models" src="../_images/sphx_glr_plot_linear_model_coefficient_interpretation_thumb.png" />
<p><a class="reference internal" href="inspection/plot_linear_model_coefficient_interpretation.html#sphx-glr-auto-examples-inspection-plot-linear-model-coefficient-interpretation-py"><span class="std std-ref">Common pitfalls in the interpretation of coefficients of linear models</span></a></p>
  <div class="sphx-glr-thumbnail-title">Common pitfalls in the interpretation of coefficients of linear models</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Machine Learning models are great for measuring statistical associations. Unfortunately, unless..."><img alt="Failure of Machine Learning to infer causal effects" src="../_images/sphx_glr_plot_causal_interpretation_thumb.png" />
<p><a class="reference internal" href="inspection/plot_causal_interpretation.html#sphx-glr-auto-examples-inspection-plot-causal-interpretation-py"><span class="std std-ref">Failure of Machine Learning to infer causal effects</span></a></p>
  <div class="sphx-glr-thumbnail-title">Failure of Machine Learning to infer causal effects</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Partial dependence plots show the dependence between the target function [2]_ and a set of feat..."><img alt="Partial Dependence and Individual Conditional Expectation Plots" src="../_images/sphx_glr_plot_partial_dependence_thumb.png" />
<p><a class="reference internal" href="inspection/plot_partial_dependence.html#sphx-glr-auto-examples-inspection-plot-partial-dependence-py"><span class="std std-ref">Partial Dependence and Individual Conditional Expectation Plots</span></a></p>
  <div class="sphx-glr-thumbnail-title">Partial Dependence and Individual Conditional Expectation Plots</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we will compare the impurity-based feature importance of RandomForestClassifie..."><img alt="Permutation Importance vs Random Forest Feature Importance (MDI)" src="../_images/sphx_glr_plot_permutation_importance_thumb.png" />
<p><a class="reference internal" href="inspection/plot_permutation_importance.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-py"><span class="std std-ref">Permutation Importance vs Random Forest Feature Importance (MDI)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Permutation Importance vs Random Forest Feature Importance (MDI)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we compute the permutation importance on the Wisconsin breast cancer dataset u..."><img alt="Permutation Importance with Multicollinear or Correlated Features" src="../_images/sphx_glr_plot_permutation_importance_multicollinear_thumb.png" />
<p><a class="reference internal" href="inspection/plot_permutation_importance_multicollinear.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-multicollinear-py"><span class="std std-ref">Permutation Importance with Multicollinear or Correlated Features</span></a></p>
  <div class="sphx-glr-thumbnail-title">Permutation Importance with Multicollinear or Correlated Features</div>
</div></div></section>
<section id="kernel-approximation">
<h2>Kernel Approximation<a class="headerlink" href="#kernel-approximation" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.kernel_approximation" title="sklearn.kernel_approximation"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.kernel_approximation</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of PolynomialCountSketch to efficiently generate polynomial ke..."><img alt="Scalable learning with polynomial kernel approximation" src="../_images/sphx_glr_plot_scalable_poly_kernels_thumb.png" />
<p><a class="reference internal" href="kernel_approximation/plot_scalable_poly_kernels.html#sphx-glr-auto-examples-kernel-approximation-plot-scalable-poly-kernels-py"><span class="std std-ref">Scalable learning with polynomial kernel approximation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Scalable learning with polynomial kernel approximation</div>
</div></div></section>
<section id="manifold-learning">
<h2>Manifold learning<a class="headerlink" href="#manifold-learning" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="An illustration of dimensionality reduction on the S-curve dataset with various manifold learni..."><img alt="Comparison of Manifold Learning methods" src="../_images/sphx_glr_plot_compare_methods_thumb.png" />
<p><a class="reference internal" href="manifold/plot_compare_methods.html#sphx-glr-auto-examples-manifold-plot-compare-methods-py"><span class="std std-ref">Comparison of Manifold Learning methods</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of Manifold Learning methods</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An application of the different manifold techniques on a spherical data-set. Here one can see t..."><img alt="Manifold Learning methods on a severed sphere" src="../_images/sphx_glr_plot_manifold_sphere_thumb.png" />
<p><a class="reference internal" href="manifold/plot_manifold_sphere.html#sphx-glr-auto-examples-manifold-plot-manifold-sphere-py"><span class="std std-ref">Manifold Learning methods on a severed sphere</span></a></p>
  <div class="sphx-glr-thumbnail-title">Manifold Learning methods on a severed sphere</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="We illustrate various embedding techniques on the digits dataset."><img alt="Manifold learning on handwritten digits: Locally Linear Embedding, Isomap..." src="../_images/sphx_glr_plot_lle_digits_thumb.png" />
<p><a class="reference internal" href="manifold/plot_lle_digits.html#sphx-glr-auto-examples-manifold-plot-lle-digits-py"><span class="std std-ref">Manifold learning on handwritten digits: Locally Linear Embedding, Isomap…</span></a></p>
  <div class="sphx-glr-thumbnail-title">Manifold learning on handwritten digits: Locally Linear Embedding, Isomap...</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An illustration of the metric and non-metric MDS on generated noisy data."><img alt="Multi-dimensional scaling" src="../_images/sphx_glr_plot_mds_thumb.png" />
<p><a class="reference internal" href="manifold/plot_mds.html#sphx-glr-auto-examples-manifold-plot-mds-py"><span class="std std-ref">Multi-dimensional scaling</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multi-dimensional scaling</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Swiss Roll And Swiss-Hole Reduction"><img alt="Swiss Roll And Swiss-Hole Reduction" src="../_images/sphx_glr_plot_swissroll_thumb.png" />
<p><a class="reference internal" href="manifold/plot_swissroll.html#sphx-glr-auto-examples-manifold-plot-swissroll-py"><span class="std std-ref">Swiss Roll And Swiss-Hole Reduction</span></a></p>
  <div class="sphx-glr-thumbnail-title">Swiss Roll And Swiss-Hole Reduction</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An illustration of t-SNE on the two concentric circles and the S-curve datasets for different p..."><img alt="t-SNE: The effect of various perplexity values on the shape" src="../_images/sphx_glr_plot_t_sne_perplexity_thumb.png" />
<p><a class="reference internal" href="manifold/plot_t_sne_perplexity.html#sphx-glr-auto-examples-manifold-plot-t-sne-perplexity-py"><span class="std std-ref">t-SNE: The effect of various perplexity values on the shape</span></a></p>
  <div class="sphx-glr-thumbnail-title">t-SNE: The effect of various perplexity values on the shape</div>
</div></div></section>
<section id="miscellaneous">
<h2>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this heading">¶</a></h2>
<p>Miscellaneous and introductory examples for scikit-learn.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="    See also sphx_glr_auto_examples_miscellaneous_plot_roc_curve_visualization_api.py"><img alt="Advanced Plotting With Partial Dependence" src="../_images/sphx_glr_plot_partial_dependence_visualization_api_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_partial_dependence_visualization_api.html#sphx-glr-auto-examples-miscellaneous-plot-partial-dependence-visualization-api-py"><span class="std std-ref">Advanced Plotting With Partial Dependence</span></a></p>
  <div class="sphx-glr-thumbnail-title">Advanced Plotting With Partial Dependence</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different anomaly detection algorithms on 2D datasets. Da..."><img alt="Comparing anomaly detection algorithms for outlier detection on toy datasets" src="../_images/sphx_glr_plot_anomaly_comparison_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_anomaly_comparison.html#sphx-glr-auto-examples-miscellaneous-plot-anomaly-comparison-py"><span class="std std-ref">Comparing anomaly detection algorithms for outlier detection on toy datasets</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing anomaly detection algorithms for outlier detection on toy datasets</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel ..."><img alt="Comparison of kernel ridge regression and SVR" src="../_images/sphx_glr_plot_kernel_ridge_regression_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_kernel_ridge_regression.html#sphx-glr-auto-examples-miscellaneous-plot-kernel-ridge-regression-py"><span class="std std-ref">Comparison of kernel ridge regression and SVR</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison of kernel ridge regression and SVR</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The default configuration for displaying a pipeline in a Jupyter Notebook is &#x27;diagram&#x27; where se..."><img alt="Displaying Pipelines" src="../_images/sphx_glr_plot_pipeline_display_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_pipeline_display.html#sphx-glr-auto-examples-miscellaneous-plot-pipeline-display-py"><span class="std std-ref">Displaying Pipelines</span></a></p>
  <div class="sphx-glr-thumbnail-title">Displaying Pipelines</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates different ways estimators and pipelines can be displayed."><img alt="Displaying estimators and complex pipelines" src="../_images/sphx_glr_plot_estimator_representation_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_estimator_representation.html#sphx-glr-auto-examples-miscellaneous-plot-estimator-representation-py"><span class="std std-ref">Displaying estimators and complex pipelines</span></a></p>
  <div class="sphx-glr-thumbnail-title">Displaying estimators and complex pipelines</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example benchmarks outlier detection algorithms, local_outlier_factor (LOF) and isolation_..."><img alt="Evaluation of outlier detection estimators" src="../_images/sphx_glr_plot_outlier_detection_bench_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_outlier_detection_bench.html#sphx-glr-auto-examples-miscellaneous-plot-outlier-detection-bench-py"><span class="std std-ref">Evaluation of outlier detection estimators</span></a></p>
  <div class="sphx-glr-thumbnail-title">Evaluation of outlier detection estimators</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example illustrating the approximation of the feature map of an RBF kernel."><img alt="Explicit feature map approximation for RBF kernels" src="../_images/sphx_glr_plot_kernel_approximation_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_kernel_approximation.html#sphx-glr-auto-examples-miscellaneous-plot-kernel-approximation-py"><span class="std std-ref">Explicit feature map approximation for RBF kernels</span></a></p>
  <div class="sphx-glr-thumbnail-title">Explicit feature map approximation for RBF kernels</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of multi-output estimator to complete images. The goal is to predict..."><img alt="Face completion with a multi-output estimators" src="../_images/sphx_glr_plot_multioutput_face_completion_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_multioutput_face_completion.html#sphx-glr-auto-examples-miscellaneous-plot-multioutput-face-completion-py"><span class="std std-ref">Face completion with a multi-output estimators</span></a></p>
  <div class="sphx-glr-thumbnail-title">Face completion with a multi-output estimators</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example will demonstrate the set_output API to configure transformers to output pandas Dat..."><img alt="Introducing the `set_output` API" src="../_images/sphx_glr_plot_set_output_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_set_output.html#sphx-glr-auto-examples-miscellaneous-plot-set-output-py"><span class="std std-ref">Introducing the set_output API</span></a></p>
  <div class="sphx-glr-thumbnail-title">Introducing the `set_output` API</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An illustration of the isotonic regression on generated data (non-linear monotonic trend with h..."><img alt="Isotonic Regression" src="../_images/sphx_glr_plot_isotonic_regression_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_isotonic_regression.html#sphx-glr-auto-examples-miscellaneous-plot-isotonic-regression-py"><span class="std std-ref">Isotonic Regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Isotonic Regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example simulates a multi-label document classification problem. The dataset is generated ..."><img alt="Multilabel classification" src="../_images/sphx_glr_plot_multilabel_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_multilabel.html#sphx-glr-auto-examples-miscellaneous-plot-multilabel-py"><span class="std std-ref">Multilabel classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multilabel classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="ROC Curve with Visualization API"><img alt="ROC Curve with Visualization API" src="../_images/sphx_glr_plot_roc_curve_visualization_api_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_roc_curve_visualization_api.html#sphx-glr-auto-examples-miscellaneous-plot-roc-curve-visualization-api-py"><span class="std std-ref">ROC Curve with Visualization API</span></a></p>
  <div class="sphx-glr-thumbnail-title">ROC Curve with Visualization API</div>
</div><div class="sphx-glr-thumbcontainer" tooltip=" The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly pr..."><img alt="The Johnson-Lindenstrauss bound for embedding with random projections" src="../_images/sphx_glr_plot_johnson_lindenstrauss_bound_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_johnson_lindenstrauss_bound.html#sphx-glr-auto-examples-miscellaneous-plot-johnson-lindenstrauss-bound-py"><span class="std std-ref">The Johnson-Lindenstrauss bound for embedding with random projections</span></a></p>
  <div class="sphx-glr-thumbnail-title">The Johnson-Lindenstrauss bound for embedding with random projections</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we will construct display objects, ConfusionMatrixDisplay, RocCurveDisplay, an..."><img alt="Visualizations with Display Objects" src="../_images/sphx_glr_plot_display_object_visualization_thumb.png" />
<p><a class="reference internal" href="miscellaneous/plot_display_object_visualization.html#sphx-glr-auto-examples-miscellaneous-plot-display-object-visualization-py"><span class="std std-ref">Visualizations with Display Objects</span></a></p>
  <div class="sphx-glr-thumbnail-title">Visualizations with Display Objects</div>
</div></div></section>
<section id="missing-value-imputation">
<h2>Missing Value Imputation<a class="headerlink" href="#missing-value-imputation" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Missing values can be replaced by the mean, the median or the most frequent value using the bas..."><img alt="Imputing missing values before building an estimator" src="../_images/sphx_glr_plot_missing_values_thumb.png" />
<p><a class="reference internal" href="impute/plot_missing_values.html#sphx-glr-auto-examples-impute-plot-missing-values-py"><span class="std std-ref">Imputing missing values before building an estimator</span></a></p>
  <div class="sphx-glr-thumbnail-title">Imputing missing values before building an estimator</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The IterativeImputer class is very flexible - it can be used with a variety of estimators to do..."><img alt="Imputing missing values with variants of IterativeImputer" src="../_images/sphx_glr_plot_iterative_imputer_variants_comparison_thumb.png" />
<p><a class="reference internal" href="impute/plot_iterative_imputer_variants_comparison.html#sphx-glr-auto-examples-impute-plot-iterative-imputer-variants-comparison-py"><span class="std std-ref">Imputing missing values with variants of IterativeImputer</span></a></p>
  <div class="sphx-glr-thumbnail-title">Imputing missing values with variants of IterativeImputer</div>
</div></div></section>
<section id="model-selection">
<h2>Model Selection<a class="headerlink" href="#model-selection" title="Permalink to this heading">¶</a></h2>
<p>Examples related to the <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example balances model complexity and cross-validated score by finding a decent accuracy w..."><img alt="Balance model complexity and cross-validated score" src="../_images/sphx_glr_plot_grid_search_refit_callable_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_grid_search_refit_callable.html#sphx-glr-auto-examples-model-selection-plot-grid-search-refit-callable-py"><span class="std std-ref">Balance model complexity and cross-validated score</span></a></p>
  <div class="sphx-glr-thumbnail-title">Balance model complexity and cross-validated score</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the class_likelihood_ratios function, which computes the positive and..."><img alt="Class Likelihood Ratios to measure classification performance" src="../_images/sphx_glr_plot_likelihood_ratios_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_likelihood_ratios.html#sphx-glr-auto-examples-model-selection-plot-likelihood-ratios-py"><span class="std std-ref">Class Likelihood Ratios to measure classification performance</span></a></p>
  <div class="sphx-glr-thumbnail-title">Class Likelihood Ratios to measure classification performance</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Compare randomized search and grid search for optimizing hyperparameters of a linear SVM with S..."><img alt="Comparing randomized search and grid search for hyperparameter estimation" src="../_images/sphx_glr_plot_randomized_search_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_randomized_search.html#sphx-glr-auto-examples-model-selection-plot-randomized-search-py"><span class="std std-ref">Comparing randomized search and grid search for hyperparameter estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing randomized search and grid search for hyperparameter estimation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example compares the parameter search performed by HalvingGridSearchCV and GridSearchCV."><img alt="Comparison between grid search and successive halving" src="../_images/sphx_glr_plot_successive_halving_heatmap_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_successive_halving_heatmap.html#sphx-glr-auto-examples-model-selection-plot-successive-halving-heatmap-py"><span class="std std-ref">Comparison between grid search and successive halving</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparison between grid search and successive halving</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Example of confusion matrix usage to evaluate the quality of the output of a classifier on the ..."><img alt="Confusion matrix" src="../_images/sphx_glr_plot_confusion_matrix_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_confusion_matrix.html#sphx-glr-auto-examples-model-selection-plot-confusion-matrix-py"><span class="std std-ref">Confusion matrix</span></a></p>
  <div class="sphx-glr-thumbnail-title">Confusion matrix</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This examples shows how a classifier is optimized by cross-validation, which is done using the ..."><img alt="Custom refit strategy of a grid search with cross-validation" src="../_images/sphx_glr_plot_grid_search_digits_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_grid_search_digits.html#sphx-glr-auto-examples-model-selection-plot-grid-search-digits-py"><span class="std std-ref">Custom refit strategy of a grid search with cross-validation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Custom refit strategy of a grid search with cross-validation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Multiple metric parameter search can be done by setting the scoring parameter to a list of metr..."><img alt="Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV" src="../_images/sphx_glr_plot_multi_metric_evaluation_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_multi_metric_evaluation.html#sphx-glr-auto-examples-model-selection-plot-multi-metric-evaluation-py"><span class="std std-ref">Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we compare two binary classification multi-threshold metrics: the Receiver Ope..."><img alt="Detection error tradeoff (DET) curve" src="../_images/sphx_glr_plot_det_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_det.html#sphx-glr-auto-examples-model-selection-plot-det-py"><span class="std std-ref">Detection error tradeoff (DET) curve</span></a></p>
  <div class="sphx-glr-thumbnail-title">Detection error tradeoff (DET) curve</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example describes the use of the Receiver Operating Characteristic (ROC) metric to evaluat..."><img alt="Multiclass Receiver Operating Characteristic (ROC)" src="../_images/sphx_glr_plot_roc_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_roc.html#sphx-glr-auto-examples-model-selection-plot-roc-py"><span class="std std-ref">Multiclass Receiver Operating Characteristic (ROC)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Multiclass Receiver Operating Characteristic (ROC)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example compares non-nested and nested cross-validation strategies on a classifier of the ..."><img alt="Nested versus non-nested cross-validation" src="../_images/sphx_glr_plot_nested_cross_validation_iris_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_nested_cross_validation_iris.html#sphx-glr-auto-examples-model-selection-plot-nested-cross-validation-iris-py"><span class="std std-ref">Nested versus non-nested cross-validation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Nested versus non-nested cross-validation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use cross_val_predict together with PredictionErrorDisplay to visuali..."><img alt="Plotting Cross-Validated Predictions" src="../_images/sphx_glr_plot_cv_predict_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_cv_predict.html#sphx-glr-auto-examples-model-selection-plot-cv-predict-py"><span class="std std-ref">Plotting Cross-Validated Predictions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plotting Cross-Validated Predictions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we show how to use the class LearningCurveDisplay to easily plot learning curv..."><img alt="Plotting Learning Curves and Checking Models' Scalability" src="../_images/sphx_glr_plot_learning_curve_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_learning_curve.html#sphx-glr-auto-examples-model-selection-plot-learning-curve-py"><span class="std std-ref">Plotting Learning Curves and Checking Models’ Scalability</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plotting Learning Curves and Checking Models' Scalability</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this plot you can see the training scores and validation scores of an SVM for different valu..."><img alt="Plotting Validation Curves" src="../_images/sphx_glr_plot_validation_curve_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_validation_curve.html#sphx-glr-auto-examples-model-selection-plot-validation-curve-py"><span class="std std-ref">Plotting Validation Curves</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plotting Validation Curves</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Example of Precision-Recall metric to evaluate classifier output quality."><img alt="Precision-Recall" src="../_images/sphx_glr_plot_precision_recall_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_precision_recall.html#sphx-glr-auto-examples-model-selection-plot-precision-recall-py"><span class="std std-ref">Precision-Recall</span></a></p>
  <div class="sphx-glr-thumbnail-title">Precision-Recall</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example presents how to estimate and visualize the variance of the Receiver Operating Char..."><img alt="Receiver Operating Characteristic (ROC) with cross validation" src="../_images/sphx_glr_plot_roc_crossval_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_roc_crossval.html#sphx-glr-auto-examples-model-selection-plot-roc-crossval-py"><span class="std std-ref">Receiver Operating Characteristic (ROC) with cross validation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Receiver Operating Characteristic (ROC) with cross validation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The dataset used in this example is 20newsgroups_dataset which will be automatically downloaded..."><img alt="Sample pipeline for text feature extraction and evaluation" src="../_images/sphx_glr_plot_grid_search_text_feature_extraction_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_grid_search_text_feature_extraction.html#sphx-glr-auto-examples-model-selection-plot-grid-search-text-feature-extraction-py"><span class="std std-ref">Sample pipeline for text feature extraction and evaluation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Sample pipeline for text feature extraction and evaluation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to statistically compare the performance of models trained and eva..."><img alt="Statistical comparison of models using grid search" src="../_images/sphx_glr_plot_grid_search_stats_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_grid_search_stats.html#sphx-glr-auto-examples-model-selection-plot-grid-search-stats-py"><span class="std std-ref">Statistical comparison of models using grid search</span></a></p>
  <div class="sphx-glr-thumbnail-title">Statistical comparison of models using grid search</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how a successive halving search (:class:`~sklearn.model_selection.Halv..."><img alt="Successive Halving Iterations" src="../_images/sphx_glr_plot_successive_halving_iterations_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_successive_halving_iterations.html#sphx-glr-auto-examples-model-selection-plot-successive-halving-iterations-py"><span class="std std-ref">Successive Halving Iterations</span></a></p>
  <div class="sphx-glr-thumbnail-title">Successive Halving Iterations</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of permutation_test_score to evaluate the significance of a c..."><img alt="Test with permutations the significance of a classification score" src="../_images/sphx_glr_plot_permutation_tests_for_classification_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_permutation_tests_for_classification.html#sphx-glr-auto-examples-model-selection-plot-permutation-tests-for-classification-py"><span class="std std-ref">Test with permutations the significance of a classification score</span></a></p>
  <div class="sphx-glr-thumbnail-title">Test with permutations the significance of a classification score</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Illustration of how the performance of an estimator on unseen data (test data) is not the same ..."><img alt="Train error vs Test error" src="../_images/sphx_glr_plot_train_error_vs_test_error_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_train_error_vs_test_error.html#sphx-glr-auto-examples-model-selection-plot-train-error-vs-test-error-py"><span class="std std-ref">Train error vs Test error</span></a></p>
  <div class="sphx-glr-thumbnail-title">Train error vs Test error</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the problems of underfitting and overfitting and how we can use linea..."><img alt="Underfitting vs. Overfitting" src="../_images/sphx_glr_plot_underfitting_overfitting_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_underfitting_overfitting.html#sphx-glr-auto-examples-model-selection-plot-underfitting-overfitting-py"><span class="std std-ref">Underfitting vs. Overfitting</span></a></p>
  <div class="sphx-glr-thumbnail-title">Underfitting vs. Overfitting</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Choosing the right cross-validation object is a crucial part of fitting a model properly. There..."><img alt="Visualizing cross-validation behavior in scikit-learn" src="../_images/sphx_glr_plot_cv_indices_thumb.png" />
<p><a class="reference internal" href="model_selection/plot_cv_indices.html#sphx-glr-auto-examples-model-selection-plot-cv-indices-py"><span class="std std-ref">Visualizing cross-validation behavior in scikit-learn</span></a></p>
  <div class="sphx-glr-thumbnail-title">Visualizing cross-validation behavior in scikit-learn</div>
</div></div></section>
<section id="multioutput-methods">
<h2>Multioutput methods<a class="headerlink" href="#multioutput-methods" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.multioutput" title="sklearn.multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="For this example we will use the `yeast &lt;https://www.openml.org/d/40597&gt;`_ dataset which contai..."><img alt="Classifier Chain" src="../_images/sphx_glr_plot_classifier_chain_yeast_thumb.png" />
<p><a class="reference internal" href="multioutput/plot_classifier_chain_yeast.html#sphx-glr-auto-examples-multioutput-plot-classifier-chain-yeast-py"><span class="std std-ref">Classifier Chain</span></a></p>
  <div class="sphx-glr-thumbnail-title">Classifier Chain</div>
</div></div></section>
<section id="nearest-neighbors">
<h2>Nearest Neighbors<a class="headerlink" href="#nearest-neighbors" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example presents how to chain KNeighborsTransformer and TSNE in a pipeline. It also shows ..."><img alt="Approximate nearest neighbors in TSNE" src="../_images/sphx_glr_approximate_nearest_neighbors_thumb.png" />
<p><a class="reference internal" href="neighbors/approximate_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-approximate-nearest-neighbors-py"><span class="std std-ref">Approximate nearest neighbors in TSNE</span></a></p>
  <div class="sphx-glr-thumbnail-title">Approximate nearest neighbors in TSNE</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This examples demonstrates how to precompute the k nearest neighbors before using them in KNeig..."><img alt="Caching nearest neighbors" src="../_images/sphx_glr_plot_caching_nearest_neighbors_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_caching_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-plot-caching-nearest-neighbors-py"><span class="std std-ref">Caching nearest neighbors</span></a></p>
  <div class="sphx-glr-thumbnail-title">Caching nearest neighbors</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example comparing nearest neighbors classification with and without Neighborhood Components ..."><img alt="Comparing Nearest Neighbors with and without Neighborhood Components Analysis" src="../_images/sphx_glr_plot_nca_classification_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_nca_classification.html#sphx-glr-auto-examples-neighbors-plot-nca-classification-py"><span class="std std-ref">Comparing Nearest Neighbors with and without Neighborhood Components Analysis</span></a></p>
  <div class="sphx-glr-thumbnail-title">Comparing Nearest Neighbors with and without Neighborhood Components Analysis</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Neighborhood Components Analysis for dimensionality reduction."><img alt="Dimensionality Reduction with Neighborhood Components Analysis" src="../_images/sphx_glr_plot_nca_dim_reduction_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_nca_dim_reduction.html#sphx-glr-auto-examples-neighbors-plot-nca-dim-reduction-py"><span class="std std-ref">Dimensionality Reduction with Neighborhood Components Analysis</span></a></p>
  <div class="sphx-glr-thumbnail-title">Dimensionality Reduction with Neighborhood Components Analysis</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example does not perform any learning over the data (see sphx_glr_auto_examples_applicatio..."><img alt="Kernel Density Estimate of Species Distributions" src="../_images/sphx_glr_plot_species_kde_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_species_kde.html#sphx-glr-auto-examples-neighbors-plot-species-kde-py"><span class="std std-ref">Kernel Density Estimate of Species Distributions</span></a></p>
  <div class="sphx-glr-thumbnail-title">Kernel Density Estimate of Species Distributions</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how kernel density estimation (KDE), a powerful non-parametric density estim..."><img alt="Kernel Density Estimation" src="../_images/sphx_glr_plot_digits_kde_sampling_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_digits_kde_sampling.html#sphx-glr-auto-examples-neighbors-plot-digits-kde-sampling-py"><span class="std std-ref">Kernel Density Estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Kernel Density Estimation</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Centroid classification. It will plot the decision boundaries for each ..."><img alt="Nearest Centroid Classification" src="../_images/sphx_glr_plot_nearest_centroid_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_nearest_centroid.html#sphx-glr-auto-examples-neighbors-plot-nearest-centroid-py"><span class="std std-ref">Nearest Centroid Classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Nearest Centroid Classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Neighbors classification. It will plot the decision boundaries for each..."><img alt="Nearest Neighbors Classification" src="../_images/sphx_glr_plot_classification_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_classification.html#sphx-glr-auto-examples-neighbors-plot-classification-py"><span class="std std-ref">Nearest Neighbors Classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Nearest Neighbors Classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Demonstrate the resolution of a regression problem using a k-Nearest Neighbor and the interpola..."><img alt="Nearest Neighbors regression" src="../_images/sphx_glr_plot_regression_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_regression.html#sphx-glr-auto-examples-neighbors-plot-regression-py"><span class="std std-ref">Nearest Neighbors regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Nearest Neighbors regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates a learned distance metric that maximizes the nearest neighbors classif..."><img alt="Neighborhood Components Analysis Illustration" src="../_images/sphx_glr_plot_nca_illustration_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_nca_illustration.html#sphx-glr-auto-examples-neighbors-plot-nca-illustration-py"><span class="std std-ref">Neighborhood Components Analysis Illustration</span></a></p>
  <div class="sphx-glr-thumbnail-title">Neighborhood Components Analysis Illustration</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp..."><img alt="Novelty detection with Local Outlier Factor (LOF)" src="../_images/sphx_glr_plot_lof_novelty_detection_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_lof_novelty_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-novelty-detection-py"><span class="std std-ref">Novelty detection with Local Outlier Factor (LOF)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Novelty detection with Local Outlier Factor (LOF)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp..."><img alt="Outlier detection with Local Outlier Factor (LOF)" src="../_images/sphx_glr_plot_lof_outlier_detection_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_lof_outlier_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-outlier-detection-py"><span class="std std-ref">Outlier detection with Local Outlier Factor (LOF)</span></a></p>
  <div class="sphx-glr-thumbnail-title">Outlier detection with Local Outlier Factor (LOF)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The first plot shows one of the problems with using histograms to visualize the density of poin..."><img alt="Simple 1D Kernel Density Estimation" src="../_images/sphx_glr_plot_kde_1d_thumb.png" />
<p><a class="reference internal" href="neighbors/plot_kde_1d.html#sphx-glr-auto-examples-neighbors-plot-kde-1d-py"><span class="std std-ref">Simple 1D Kernel Density Estimation</span></a></p>
  <div class="sphx-glr-thumbnail-title">Simple 1D Kernel Density Estimation</div>
</div></div></section>
<section id="neural-networks">
<h2>Neural Networks<a class="headerlink" href="#neural-networks" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.neural_network" title="sklearn.neural_network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example visualizes some training loss curves for different stochastic learning strategies,..."><img alt="Compare Stochastic learning strategies for MLPClassifier" src="../_images/sphx_glr_plot_mlp_training_curves_thumb.png" />
<p><a class="reference internal" href="neural_networks/plot_mlp_training_curves.html#sphx-glr-auto-examples-neural-networks-plot-mlp-training-curves-py"><span class="std std-ref">Compare Stochastic learning strategies for MLPClassifier</span></a></p>
  <div class="sphx-glr-thumbnail-title">Compare Stochastic learning strategies for MLPClassifier</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="For greyscale image data where pixel values can be interpreted as degrees of blackness on a whi..."><img alt="Restricted Boltzmann Machine features for digit classification" src="../_images/sphx_glr_plot_rbm_logistic_classification_thumb.png" />
<p><a class="reference internal" href="neural_networks/plot_rbm_logistic_classification.html#sphx-glr-auto-examples-neural-networks-plot-rbm-logistic-classification-py"><span class="std std-ref">Restricted Boltzmann Machine features for digit classification</span></a></p>
  <div class="sphx-glr-thumbnail-title">Restricted Boltzmann Machine features for digit classification</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A comparison of different values for regularization parameter &#x27;alpha&#x27; on synthetic datasets. Th..."><img alt="Varying regularization in Multi-layer Perceptron" src="../_images/sphx_glr_plot_mlp_alpha_thumb.png" />
<p><a class="reference internal" href="neural_networks/plot_mlp_alpha.html#sphx-glr-auto-examples-neural-networks-plot-mlp-alpha-py"><span class="std std-ref">Varying regularization in Multi-layer Perceptron</span></a></p>
  <div class="sphx-glr-thumbnail-title">Varying regularization in Multi-layer Perceptron</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Sometimes looking at the learned coefficients of a neural network can provide insight into the ..."><img alt="Visualization of MLP weights on MNIST" src="../_images/sphx_glr_plot_mnist_filters_thumb.png" />
<p><a class="reference internal" href="neural_networks/plot_mnist_filters.html#sphx-glr-auto-examples-neural-networks-plot-mnist-filters-py"><span class="std std-ref">Visualization of MLP weights on MNIST</span></a></p>
  <div class="sphx-glr-thumbnail-title">Visualization of MLP weights on MNIST</div>
</div></div></section>
<section id="pipelines-and-composite-estimators">
<h2>Pipelines and composite estimators<a class="headerlink" href="#pipelines-and-composite-estimators" title="Permalink to this heading">¶</a></h2>
<p>Examples of how to compose transformers and pipelines from other estimators. See the <a class="reference internal" href="../modules/compose.html#combining-estimators"><span class="std std-ref">User Guide</span></a>.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Datasets can often contain components that require different feature extraction and processing ..."><img alt="Column Transformer with Heterogeneous Data Sources" src="../_images/sphx_glr_plot_column_transformer_thumb.png" />
<p><a class="reference internal" href="compose/plot_column_transformer.html#sphx-glr-auto-examples-compose-plot-column-transformer-py"><span class="std std-ref">Column Transformer with Heterogeneous Data Sources</span></a></p>
  <div class="sphx-glr-thumbnail-title">Column Transformer with Heterogeneous Data Sources</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to apply different preprocessing and feature extraction pipelines ..."><img alt="Column Transformer with Mixed Types" src="../_images/sphx_glr_plot_column_transformer_mixed_types_thumb.png" />
<p><a class="reference internal" href="compose/plot_column_transformer_mixed_types.html#sphx-glr-auto-examples-compose-plot-column-transformer-mixed-types-py"><span class="std std-ref">Column Transformer with Mixed Types</span></a></p>
  <div class="sphx-glr-thumbnail-title">Column Transformer with Mixed Types</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In many real-world examples, there are many ways to extract features from a dataset. Often it i..."><img alt="Concatenating multiple feature extraction methods" src="../_images/sphx_glr_plot_feature_union_thumb.png" />
<p><a class="reference internal" href="compose/plot_feature_union.html#sphx-glr-auto-examples-compose-plot-feature-union-py"><span class="std std-ref">Concatenating multiple feature extraction methods</span></a></p>
  <div class="sphx-glr-thumbnail-title">Concatenating multiple feature extraction methods</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, we give an overview of TransformedTargetRegressor. We use two examples to illu..."><img alt="Effect of transforming the targets in regression model" src="../_images/sphx_glr_plot_transformed_target_thumb.png" />
<p><a class="reference internal" href="compose/plot_transformed_target.html#sphx-glr-auto-examples-compose-plot-transformed-target-py"><span class="std std-ref">Effect of transforming the targets in regression model</span></a></p>
  <div class="sphx-glr-thumbnail-title">Effect of transforming the targets in regression model</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The PCA does an unsupervised dimensionality reduction, while the logistic regression does the p..."><img alt="Pipelining: chaining a PCA and a logistic regression" src="../_images/sphx_glr_plot_digits_pipe_thumb.png" />
<p><a class="reference internal" href="compose/plot_digits_pipe.html#sphx-glr-auto-examples-compose-plot-digits-pipe-py"><span class="std std-ref">Pipelining: chaining a PCA and a logistic regression</span></a></p>
  <div class="sphx-glr-thumbnail-title">Pipelining: chaining a PCA and a logistic regression</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example constructs a pipeline that does dimensionality reduction followed by prediction wi..."><img alt="Selecting dimensionality reduction with Pipeline and GridSearchCV" src="../_images/sphx_glr_plot_compare_reduction_thumb.png" />
<p><a class="reference internal" href="compose/plot_compare_reduction.html#sphx-glr-auto-examples-compose-plot-compare-reduction-py"><span class="std std-ref">Selecting dimensionality reduction with Pipeline and GridSearchCV</span></a></p>
  <div class="sphx-glr-thumbnail-title">Selecting dimensionality reduction with Pipeline and GridSearchCV</div>
</div></div></section>
<section id="preprocessing">
<h2>Preprocessing<a class="headerlink" href="#preprocessing" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Feature 0 (median income in a block) and feature 5 (average house occupancy) of the california_..."><img alt="Compare the effect of different scalers on data with outliers" src="../_images/sphx_glr_plot_all_scaling_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_all_scaling.html#sphx-glr-auto-examples-preprocessing-plot-all-scaling-py"><span class="std std-ref">Compare the effect of different scalers on data with outliers</span></a></p>
  <div class="sphx-glr-thumbnail-title">Compare the effect of different scalers on data with outliers</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example presents the different strategies implemented in KBinsDiscretizer:"><img alt="Demonstrating the different strategies of KBinsDiscretizer" src="../_images/sphx_glr_plot_discretization_strategies_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_discretization_strategies.html#sphx-glr-auto-examples-preprocessing-plot-discretization-strategies-py"><span class="std std-ref">Demonstrating the different strategies of KBinsDiscretizer</span></a></p>
  <div class="sphx-glr-thumbnail-title">Demonstrating the different strategies of KBinsDiscretizer</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A demonstration of feature discretization on synthetic classification datasets. Feature discret..."><img alt="Feature discretization" src="../_images/sphx_glr_plot_discretization_classification_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_discretization_classification.html#sphx-glr-auto-examples-preprocessing-plot-discretization-classification-py"><span class="std std-ref">Feature discretization</span></a></p>
  <div class="sphx-glr-thumbnail-title">Feature discretization</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Feature scaling through standardization, also called Z-score normalization, is an important pre..."><img alt="Importance of Feature Scaling" src="../_images/sphx_glr_plot_scaling_importance_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_scaling_importance.html#sphx-glr-auto-examples-preprocessing-plot-scaling-importance-py"><span class="std std-ref">Importance of Feature Scaling</span></a></p>
  <div class="sphx-glr-thumbnail-title">Importance of Feature Scaling</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of the Box-Cox and Yeo-Johnson transforms through PowerTransf..."><img alt="Map data to a normal distribution" src="../_images/sphx_glr_plot_map_data_to_normal_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_map_data_to_normal.html#sphx-glr-auto-examples-preprocessing-plot-map-data-to-normal-py"><span class="std std-ref">Map data to a normal distribution</span></a></p>
  <div class="sphx-glr-thumbnail-title">Map data to a normal distribution</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The example compares prediction result of linear regression (linear model) and decision tree (t..."><img alt="Using KBinsDiscretizer to discretize continuous features" src="../_images/sphx_glr_plot_discretization_thumb.png" />
<p><a class="reference internal" href="preprocessing/plot_discretization.html#sphx-glr-auto-examples-preprocessing-plot-discretization-py"><span class="std std-ref">Using KBinsDiscretizer to discretize continuous features</span></a></p>
  <div class="sphx-glr-thumbnail-title">Using KBinsDiscretizer to discretize continuous features</div>
</div></div></section>
<section id="semi-supervised-classification">
<h2>Semi Supervised Classification<a class="headerlink" href="#semi-supervised-classification" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.semi_supervised" title="sklearn.semi_supervised"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.semi_supervised</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="A comparison for the decision boundaries generated on the iris dataset by Label Spreading, Self..."><img alt="Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset" src="../_images/sphx_glr_plot_semi_supervised_versus_svm_iris_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_semi_supervised_versus_svm_iris.html#sphx-glr-auto-examples-semi-supervised-plot-semi-supervised-versus-svm-iris-py"><span class="std std-ref">Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of a varying threshold on self-training. The breast_cancer ..."><img alt="Effect of varying threshold for self-training" src="../_images/sphx_glr_plot_self_training_varying_threshold_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_self_training_varying_threshold.html#sphx-glr-auto-examples-semi-supervised-plot-self-training-varying-threshold-py"><span class="std std-ref">Effect of varying threshold for self-training</span></a></p>
  <div class="sphx-glr-thumbnail-title">Effect of varying threshold for self-training</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Demonstrates an active learning technique to learn handwritten digits using label propagation."><img alt="Label Propagation digits active learning" src="../_images/sphx_glr_plot_label_propagation_digits_active_learning_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_label_propagation_digits_active_learning.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-active-learning-py"><span class="std std-ref">Label Propagation digits active learning</span></a></p>
  <div class="sphx-glr-thumbnail-title">Label Propagation digits active learning</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the power of semisupervised learning by training a Label Spreading mo..."><img alt="Label Propagation digits: Demonstrating performance" src="../_images/sphx_glr_plot_label_propagation_digits_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_label_propagation_digits.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-py"><span class="std std-ref">Label Propagation digits: Demonstrating performance</span></a></p>
  <div class="sphx-glr-thumbnail-title">Label Propagation digits: Demonstrating performance</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Example of LabelPropagation learning a complex internal structure to demonstrate &quot;manifold lear..."><img alt="Label Propagation learning a complex structure" src="../_images/sphx_glr_plot_label_propagation_structure_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_label_propagation_structure.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-structure-py"><span class="std std-ref">Label Propagation learning a complex structure</span></a></p>
  <div class="sphx-glr-thumbnail-title">Label Propagation learning a complex structure</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example, semi-supervised classifiers are trained on the 20 newsgroups dataset (which wi..."><img alt="Semi-supervised Classification on a Text Dataset" src="../_images/sphx_glr_plot_semi_supervised_newsgroups_thumb.png" />
<p><a class="reference internal" href="semi_supervised/plot_semi_supervised_newsgroups.html#sphx-glr-auto-examples-semi-supervised-plot-semi-supervised-newsgroups-py"><span class="std std-ref">Semi-supervised Classification on a Text Dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Semi-supervised Classification on a Text Dataset</div>
</div></div></section>
<section id="support-vector-machines">
<h2>Support Vector Machines<a class="headerlink" href="#support-vector-machines" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.svm" title="sklearn.svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a ..."><img alt="Non-linear SVM" src="../_images/sphx_glr_plot_svm_nonlinear_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_nonlinear.html#sphx-glr-auto-examples-svm-plot-svm-nonlinear-py"><span class="std std-ref">Non-linear SVM</span></a></p>
  <div class="sphx-glr-thumbnail-title">Non-linear SVM</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="An example using a one-class SVM for novelty detection."><img alt="One-class SVM with non-linear kernel (RBF)" src="../_images/sphx_glr_plot_oneclass_thumb.png" />
<p><a class="reference internal" href="svm/plot_oneclass.html#sphx-glr-auto-examples-svm-plot-oneclass-py"><span class="std std-ref">One-class SVM with non-linear kernel (RBF)</span></a></p>
  <div class="sphx-glr-thumbnail-title">One-class SVM with non-linear kernel (RBF)</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Comparison of different linear SVM classifiers on a 2D projection of the iris dataset. We only ..."><img alt="Plot different SVM classifiers in the iris dataset" src="../_images/sphx_glr_plot_iris_svc_thumb.png" />
<p><a class="reference internal" href="svm/plot_iris_svc.html#sphx-glr-auto-examples-svm-plot-iris-svc-py"><span class="std std-ref">Plot different SVM classifiers in the iris dataset</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot different SVM classifiers in the iris dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Unlike SVC (based on LIBSVM), LinearSVC (based on LIBLINEAR) does not provide the support vecto..."><img alt="Plot the support vectors in LinearSVC" src="../_images/sphx_glr_plot_linearsvc_support_vectors_thumb.png" />
<p><a class="reference internal" href="svm/plot_linearsvc_support_vectors.html#sphx-glr-auto-examples-svm-plot-linearsvc-support-vectors-py"><span class="std std-ref">Plot the support vectors in LinearSVC</span></a></p>
  <div class="sphx-glr-thumbnail-title">Plot the support vectors in LinearSVC</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of the parameters gamma and C of the Radial Basis Function ..."><img alt="RBF SVM parameters" src="../_images/sphx_glr_plot_rbf_parameters_thumb.png" />
<p><a class="reference internal" href="svm/plot_rbf_parameters.html#sphx-glr-auto-examples-svm-plot-rbf-parameters-py"><span class="std std-ref">RBF SVM parameters</span></a></p>
  <div class="sphx-glr-thumbnail-title">RBF SVM parameters</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A small value of C includes more/all the observations, allowing the margins to be calculated us..."><img alt="SVM Margins Example" src="../_images/sphx_glr_plot_svm_margin_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_margin.html#sphx-glr-auto-examples-svm-plot-svm-margin-py"><span class="std std-ref">SVM Margins Example</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM Margins Example</div>
</div><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..."><img alt="SVM Tie Breaking Example" src="../_images/sphx_glr_plot_svm_tie_breaking_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_tie_breaking.html#sphx-glr-auto-examples-svm-plot-svm-tie-breaking-py"><span class="std std-ref">SVM Tie Breaking Example</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM Tie Breaking Example</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface..."><img alt="SVM with custom kernel" src="../_images/sphx_glr_plot_custom_kernel_thumb.png" />
<p><a class="reference internal" href="svm/plot_custom_kernel.html#sphx-glr-auto-examples-svm-plot-custom-kernel-py"><span class="std std-ref">SVM with custom kernel</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM with custom kernel</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows how to perform univariate feature selection before running a SVC (support ve..."><img alt="SVM-Anova: SVM with univariate feature selection" src="../_images/sphx_glr_plot_svm_anova_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_anova.html#sphx-glr-auto-examples-svm-plot-svm-anova-py"><span class="std std-ref">SVM-Anova: SVM with univariate feature selection</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM-Anova: SVM with univariate feature selection</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially..."><img alt="SVM-Kernels" src="../_images/sphx_glr_plot_svm_kernels_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_kernels.html#sphx-glr-auto-examples-svm-plot-svm-kernels-py"><span class="std std-ref">SVM-Kernels</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM-Kernels</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a Supp..."><img alt="SVM: Maximum margin separating hyperplane" src="../_images/sphx_glr_plot_separating_hyperplane_thumb.png" />
<p><a class="reference internal" href="svm/plot_separating_hyperplane.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-py"><span class="std std-ref">SVM: Maximum margin separating hyperplane</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM: Maximum margin separating hyperplane</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Find the optimal separating hyperplane using an SVC for classes that are unbalanced."><img alt="SVM: Separating hyperplane for unbalanced classes" src="../_images/sphx_glr_plot_separating_hyperplane_unbalanced_thumb.png" />
<p><a class="reference internal" href="svm/plot_separating_hyperplane_unbalanced.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-unbalanced-py"><span class="std std-ref">SVM: Separating hyperplane for unbalanced classes</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM: Separating hyperplane for unbalanced classes</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w..."><img alt="SVM: Weighted samples" src="../_images/sphx_glr_plot_weighted_samples_thumb.png" />
<p><a class="reference internal" href="svm/plot_weighted_samples.html#sphx-glr-auto-examples-svm-plot-weighted-samples-py"><span class="std std-ref">SVM: Weighted samples</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM: Weighted samples</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="The following example illustrates the effect of scaling the regularization parameter when using..."><img alt="Scaling the regularization parameter for SVCs" src="../_images/sphx_glr_plot_svm_scale_c_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_scale_c.html#sphx-glr-auto-examples-svm-plot-svm-scale-c-py"><span class="std std-ref">Scaling the regularization parameter for SVCs</span></a></p>
  <div class="sphx-glr-thumbnail-title">Scaling the regularization parameter for SVCs</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="Toy example of 1D regression using linear, polynomial and RBF kernels."><img alt="Support Vector Regression (SVR) using linear and non-linear kernels" src="../_images/sphx_glr_plot_svm_regression_thumb.png" />
<p><a class="reference internal" href="svm/plot_svm_regression.html#sphx-glr-auto-examples-svm-plot-svm-regression-py"><span class="std std-ref">Support Vector Regression (SVR) using linear and non-linear kernels</span></a></p>
  <div class="sphx-glr-thumbnail-title">Support Vector Regression (SVR) using linear and non-linear kernels</div>
</div></div></section>
<section id="tutorial-exercises">
<h2>Tutorial exercises<a class="headerlink" href="#tutorial-exercises" title="Permalink to this heading">¶</a></h2>
<p>Exercises for the tutorials</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise using Cross-validation with an SVM on the Digits dataset."><img alt="Cross-validation on Digits Dataset Exercise" src="../_images/sphx_glr_plot_cv_digits_thumb.png" />
<p><a class="reference internal" href="exercises/plot_cv_digits.html#sphx-glr-auto-examples-exercises-plot-cv-digits-py"><span class="std std-ref">Cross-validation on Digits Dataset Exercise</span></a></p>
  <div class="sphx-glr-thumbnail-title">Cross-validation on Digits Dataset Exercise</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise which uses cross-validation with linear models."><img alt="Cross-validation on diabetes Dataset Exercise" src="../_images/sphx_glr_plot_cv_diabetes_thumb.png" />
<p><a class="reference internal" href="exercises/plot_cv_diabetes.html#sphx-glr-auto-examples-exercises-plot-cv-diabetes-py"><span class="std std-ref">Cross-validation on diabetes Dataset Exercise</span></a></p>
  <div class="sphx-glr-thumbnail-title">Cross-validation on diabetes Dataset Exercise</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise regarding the use of classification techniques on the Digits dataset."><img alt="Digits Classification Exercise" src="../_images/sphx_glr_plot_digits_classification_exercise_thumb.png" />
<p><a class="reference internal" href="exercises/plot_digits_classification_exercise.html#sphx-glr-auto-examples-exercises-plot-digits-classification-exercise-py"><span class="std std-ref">Digits Classification Exercise</span></a></p>
  <div class="sphx-glr-thumbnail-title">Digits Classification Exercise</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise for using different SVM kernels."><img alt="SVM Exercise" src="../_images/sphx_glr_plot_iris_exercise_thumb.png" />
<p><a class="reference internal" href="exercises/plot_iris_exercise.html#sphx-glr-auto-examples-exercises-plot-iris-exercise-py"><span class="std std-ref">SVM Exercise</span></a></p>
  <div class="sphx-glr-thumbnail-title">SVM Exercise</div>
</div></div></section>
<section id="working-with-text-documents">
<h2>Working with text documents<a class="headerlink" href="#working-with-text-documents" title="Permalink to this heading">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction.text" title="sklearn.feature_extraction.text"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text</span></code></a> module.</p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used to classify documents by topics using a..."><img alt="Classification of text documents using sparse features" src="../_images/sphx_glr_plot_document_classification_20newsgroups_thumb.png" />
<p><a class="reference internal" href="text/plot_document_classification_20newsgroups.html#sphx-glr-auto-examples-text-plot-document-classification-20newsgroups-py"><span class="std std-ref">Classification of text documents using sparse features</span></a></p>
  <div class="sphx-glr-thumbnail-title">Classification of text documents using sparse features</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how the scikit-learn API can be used to cluster documents by topics ..."><img alt="Clustering text documents using k-means" src="../_images/sphx_glr_plot_document_clustering_thumb.png" />
<p><a class="reference internal" href="text/plot_document_clustering.html#sphx-glr-auto-examples-text-plot-document-clustering-py"><span class="std std-ref">Clustering text documents using k-means</span></a></p>
  <div class="sphx-glr-thumbnail-title">Clustering text documents using k-means</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="In this example we illustrate text vectorization, which is the process of representing non-nume..."><img alt="FeatureHasher and DictVectorizer Comparison" src="../_images/sphx_glr_plot_hashing_vs_dict_vectorizer_thumb.png" />
<p><a class="reference internal" href="text/plot_hashing_vs_dict_vectorizer.html#sphx-glr-auto-examples-text-plot-hashing-vs-dict-vectorizer-py"><span class="std std-ref">FeatureHasher and DictVectorizer Comparison</span></a></p>
  <div class="sphx-glr-thumbnail-title">FeatureHasher and DictVectorizer Comparison</div>
</div></div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-footer sphx-glr-footer-gallery docutils container">
<div class="sphx-glr-download sphx-glr-download-python docutils container">
<p><a class="reference download internal" download="" href="../_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre">auto_examples_python.zip</span></code></a></p>
</div>
<div class="sphx-glr-download sphx-glr-download-jupyter docutils container">
<p><a class="reference download internal" download="" href="../_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Jupyter</span> <span class="pre">notebooks:</span> <span class="pre">auto_examples_jupyter.zip</span></code></a></p>
</div>
</div>
<p class="sphx-glr-signature"><a class="reference external" href="https://sphinx-gallery.github.io">Gallery generated by Sphinx-Gallery</a></p>
</section>
</section>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2023, scikit-learn developers (BSD License).
          <a href="../_sources/auto_examples/index.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high performance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
    <script src="https://scikit-learn.org/versionwarning.js"></script>
</body>
</html>