[scikit-learn] Using fit_intercept with sparse matrices

Jaidev Deshpande deshpande.jaidev at gmail.com
Mon Jul 4 06:13:29 EDT 2016


On Mon, 4 Jul 2016 at 15:33 Tom DLT <tom.duprelatour at orange.fr> wrote:

> note2:
>
> The LogisticRegression and Ridge(solver='sag') code do fit the intercept
> without breaking sparsity.
>
> For other solvers in Ridge, in the case of a sparse X input, the solver
> will automatically be changed to 'sag' and raise a warning.
>
> Tom
>
> 2016-07-04 7:24 GMT+02:00 Tom Dupré la Tour <tom.duprelatour.10 at gmail.com>
> :
>
>> note2:
>>
>> The LogisticRegression and Ridge(solver='sag') code do fit the intercept
>> without breaking sparsity.
>>
>> For other solvers in Ridge, in the case of a sparse X input, the solver
>> will automatically be changed to 'sag' and raise a warning.
>>
> Thanks. I understand that these estimators can fit the intercept without
breaking the sparsity.

My point was, would it not be useful to raise a warning when the input is
sparse and the user does _not_ want to fit the intercept?



> Le 2 juil. 2016 15:48, "Alexandre Gramfort" <
>> alexandre.gramfort at telecom-paristech.fr> a écrit :
>>
>>> note:
>>>
>>> the Lasso and ElasticNet code do fit the intercept without breaking
>>> sparsity.
>>>
>>> Alex
>>> _______________________________________________
>>> scikit-learn mailing list
>>> scikit-learn at python.org
>>> https://mail.python.org/mailman/listinfo/scikit-learn
>>>
>> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20160704/ecbee1d8/attachment.html>


More information about the scikit-learn mailing list