

.. _example_ensemble_plot_gradient_boosting_regression.py:


============================
Gradient Boosting regression
============================

Demonstrate Gradient Boosting on the boston housing dataset.

This example fits a Gradient Boosting model with least squares loss and
500 regression trees of depth 4.



.. image:: images/plot_gradient_boosting_regression_1.png
    :align: center


**Script output**::

  MSE: 6.2736



**Python source code:** :download:`plot_gradient_boosting_regression.py <plot_gradient_boosting_regression.py>`

.. literalinclude:: plot_gradient_boosting_regression.py
    :lines: 11-
    