

.. _example_plot_isotonic_regression.py:


===================
Isotonic Regression
===================

An illustration of the isotonic regression on generated data. The
isotonic regression finds a non-decreasing approximation of a function
while minimizing the mean squared error on the training data. The benefit
of such a model is that it does not assume any form for the target
function such as linearity. For comparison a linear regression is also
presented.



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

.. literalinclude:: plot_isotonic_regression.py
    :lines: 14-
    