Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > e578866d55cd81fdb23827cdf3cec911 > files > 520

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



.. _example_linear_model_lasso_dense_vs_sparse_data.py:


==============================
Lasso on dense and sparse data
==============================

We show that linear_model.Lasso and linear_model.sparse.Lasso
provide the same results and that in the case of
sparse data linear_model.sparse.Lasso improves the speed.



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

.. literalinclude:: lasso_dense_vs_sparse_data.py
    :lines: 11-