

.. _sphx_glr_auto_examples_gaussian_process:

.. _gaussian_process_examples:

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

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



.. raw:: html

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

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows the ability of the WhiteKernel to estimate the noise level in the data. Moreover, we show the importance of kernel hyperparameters initialization.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpr_noisy`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ability of Gaussian process regression (GPR) to estimate data noise-level</div>
    </div>


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_compare_gpr_krr`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example is based on Section 5.4.3 of &quot;Gaussian Processes for Machine Learning&quot; [1]_. It illustrates an example of complex kernel engineering and hyperparameter optimization using gradient ascent on the log-marginal-likelihood. The data consists of the monthly average atmospheric CO2 concentrations (in parts per million by volume (ppm)) collected at the Mauna Loa Observatory in Hawaii, between 1958 and 2001. The objective is to model the CO2 concentration as a function of the time t and extrapolate for years after 2001.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpr_co2`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Forecasting of CO2 level on Mona Loa dataset using Gaussian process regression (GPR)</div>
    </div>


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpr_noisy_targets`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an isotropic and anisotropic RBF kernel on a two-dimensional version for the iris-dataset. The anisotropic RBF kernel obtains slightly higher log-marginal-likelihood by assigning different length-scales to the two feature dimensions.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpc_iris`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Gaussian processes for regression and classification tasks on data that are not in fixed-length feature vector form. This is achieved through the use of kernel functions that operates directly on discrete structures such as variable-length sequences, trees, and graphs.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpr_on_structured_data`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates GPC on XOR data. Compared are a stationary, isotropic kernel (RBF) and a non-stationary kernel (DotProduct). On this particular dataset, the DotProduct kernel obtains considerably better results because the class-boundaries are linear and coincide with the coordinate axes. In general, stationary kernels often obtain better results.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpc_xor`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the prior and posterior of a GaussianProcessRegressor with different kernels. Mean, standard deviation, and 5 samples are shown for both prior and posterior distributions.">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpr_prior_posterior`

.. raw:: html

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


.. raw:: html

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

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpc_isoprobability`

.. raw:: html

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


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an RBF kernel with different choices of the hyperparameters. The first figure shows the predicted probability of GPC with arbitrarily chosen hyperparameters and with the hyperparameters corresponding to the maximum log-marginal-likelihood (LML).">

.. only:: html

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

  :doc:`/auto_examples/gaussian_process/plot_gpc`

.. raw:: html

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


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/gaussian_process/plot_gpr_noisy
   /auto_examples/gaussian_process/plot_compare_gpr_krr
   /auto_examples/gaussian_process/plot_gpr_co2
   /auto_examples/gaussian_process/plot_gpr_noisy_targets
   /auto_examples/gaussian_process/plot_gpc_iris
   /auto_examples/gaussian_process/plot_gpr_on_structured_data
   /auto_examples/gaussian_process/plot_gpc_xor
   /auto_examples/gaussian_process/plot_gpr_prior_posterior
   /auto_examples/gaussian_process/plot_gpc_isoprobability
   /auto_examples/gaussian_process/plot_gpc

