.. _example_linear_model_plot_ols_3d.py:


=========================================================
Sparsity Example: Fitting only features 1  and 2
=========================================================

Features 1 and 2 of the diabetes-dataset are fitted and
plotted below. It illustrates that although feature 2
has a strong coefficient on the full model, it does not
give us much regarding `y` when compared to just feature 1




.. rst-class:: horizontal


    *

      .. image:: images/plot_ols_3d_001.png
            :scale: 47

    *

      .. image:: images/plot_ols_3d_002.png
            :scale: 47

    *

      .. image:: images/plot_ols_3d_003.png
            :scale: 47




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

.. literalinclude:: plot_ols_3d.py
    :lines: 15-

**Total running time of the example:**  0.26 seconds
( 0 minutes  0.26 seconds)