Skip to content

Classwise (group) L21 penalty for multinomial LogisticRegression #32869

@lorentzenchr

Description

@lorentzenchr

Describe the workflow you want to enable

For LogisticRegression with n_classes >= 3, I would like to specify a class-wise (grouped) L21 penalty $\sum_{j=1}^{n_{features}} \Vert\beta_{j,\cdot}\Vert_2 = \sum_{j=1}^{n_{features}} \sum_{k=1}^{n_{classes}}|\beta_{j,k}|$ instead of the implemented L1 penalty $\sum_{j=1}^{n_{features}} \sum_{k=1}^{n_{classes}}\Vert\beta\Vert_2$.
The difference is bassically the same as calling MultiTaskElasticNet().fit(X, y) vs ElasticNet().fit(X, y.ravel()).

glmnet has the option type.multinomial = "grouped" and (default) type.multinomial = "ungrouped".

Describe your proposed solution

Introduce a new parameter, e.g. l1_type or similar.

Describe alternatives you've considered, if relevant

No response

Additional context

I could not find any discussion in and around of #8446 (SAGA was the first and so far only solver capable of solving multinomial case with L1 penalties).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions