Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > e578866d55cd81fdb23827cdf3cec911 > files > 531

python-scikits-learn-0.6-1mdv2010.2.i586.rpm



.. _example_linear_model_plot_sgd_ols.py:


===============================
Ordinary Least Squares with SGD
===============================

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


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

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

.. literalinclude:: plot_sgd_ols.py
    :lines: 10-