scikit-learn/scikit-learn — pull request #1560 by vene (2013-01-10 18:13:52+00:00)
Title: [WIP] Ridge fit_intercept with sparse X (issue #1389)

At the moment partly ignores fit_intercept if X is sparse: It sets the intercept to the mean of `y` but doesn't take into account X, because `_center_data` doesn't center sparse matrices.

This PR fits a (penalized) intercept in the sparse case by using `add_dummy_feature`.

TODO:
- Default values as suggested by @mblondel
- Intercept weight
- Figure out why this doesn't work in the wide X case: either what I'm doing is wrong, or the test isn't appropriate?