.. _example_glm_plot_ols.py:


Ordinary Least Squares
======================

Simple Ordinary Least Squares example, we draw the linear least
squares solution for a random set of points in the plane.


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

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

.. literalinclude:: plot_ols.py
    :lines: 8-