Skip to content

fit_intercept in Ridge (sparse case) #1389

@mblondel

Description

@mblondel

In the sparse case, Ridge silently ignores fit_intercept (currently, it's equivalent to fit_interept=False).

Using the recently added add_dummy_feature, it should now be easy to support fit_intercept=True.

Since it corresponds to penalizing the intercept, we need to add a intercept_scale option to the constructor (like LinearSVC).

add_dummy_feature results in a copy of X. I suggests to set fit_intercept="auto" by default. In the dense case, auto can correspond to fit_intercept=True and in the sparse case to fit_intercept=False (to avoid the memory copy). This way, the code will be backward compatible too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions