

.. _sphx_glr_auto_examples_miscellaneous:

.. _miscellaneous_examples:

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

Miscellaneous and introductory examples for scikit-learn.



.. raw:: html

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

.. thumbnail-parent-div-open

.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_partial_dependence_visualization_api`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different anomaly detection algorithms on 2D datasets. Datasets contain one or two modes (regions of high density) to illustrate the ability of algorithms to cope with multimodal data.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_anomaly_comparison`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel trick, i.e., they learn a linear function in the space induced by the respective kernel which corresponds to a non-linear function in the original space. They differ in the loss functions (ridge versus epsilon-insensitive loss). In contrast to SVR, fitting a KRR can be done in closed-form and is typically faster for medium-sized datasets. On the other hand, the learned model is non-sparse and thus slower than SVR at prediction-time.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_kernel_ridge_regression`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The default configuration for displaying a pipeline in a Jupyter Notebook is &#x27;diagram&#x27; where set_config(display=&#x27;diagram&#x27;). To deactivate HTML representation, use set_config(display=&#x27;text&#x27;).">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_pipeline_display`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_estimator_representation`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares two outlier detection algorithms, namely local_outlier_factor (LOF) and isolation_forest (IForest), on real-world datasets available in sklearn.datasets. The goal is to show that different algorithms perform well on different datasets and contrast their training speed and sensitivity to hyperparameters.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_outlier_detection_bench`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_kernel_approximation`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_multioutput_face_completion`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example will demonstrate the set_output API to configure transformers to output pandas DataFrames. set_output can be configured per estimator by calling the set_output method or globally by setting set_config(transform_output=&quot;pandas&quot;). For details, see SLEP018.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_set_output`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_isotonic_regression`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This document shows how you can use the metadata routing mechanism &lt;metadata_routing&gt; in scikit-learn to route metadata to the estimators, scorers, and CV splitters consuming them.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_metadata_routing`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Metadata Routing</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example simulates a multi-label document classification problem. The dataset is generated randomly based on the following process:">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_multilabel`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_roc_curve_visualization_api`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip=" The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly projected into a lower dimensional Euclidean space while controlling the distortion in the pairwise distances.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will construct display objects, ConfusionMatrixDisplay, RocCurveDisplay, and PrecisionRecallDisplay directly from their respective metrics. This is an alternative to using their corresponding plot functions when a model&#x27;s predictions are already computed or expensive to compute. Note that this is advanced usage, and in general we recommend using their respective plot functions.">

.. only:: html

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

  :doc:`/auto_examples/miscellaneous/plot_display_object_visualization`

.. raw:: html

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


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/miscellaneous/plot_partial_dependence_visualization_api
   /auto_examples/miscellaneous/plot_anomaly_comparison
   /auto_examples/miscellaneous/plot_kernel_ridge_regression
   /auto_examples/miscellaneous/plot_pipeline_display
   /auto_examples/miscellaneous/plot_estimator_representation
   /auto_examples/miscellaneous/plot_outlier_detection_bench
   /auto_examples/miscellaneous/plot_kernel_approximation
   /auto_examples/miscellaneous/plot_multioutput_face_completion
   /auto_examples/miscellaneous/plot_set_output
   /auto_examples/miscellaneous/plot_isotonic_regression
   /auto_examples/miscellaneous/plot_metadata_routing
   /auto_examples/miscellaneous/plot_multilabel
   /auto_examples/miscellaneous/plot_roc_curve_visualization_api
   /auto_examples/miscellaneous/plot_johnson_lindenstrauss_bound
   /auto_examples/miscellaneous/plot_display_object_visualization

