Skip to content

Please extend the loss-functions in SGDRegressor to allow incremental learning of Poisson / Gamma / Tweedie regressors #29600

Open

Description

@alexshtf

Describe the workflow you want to enable

I would like SGDRegressor to be able to accept additional values in its 'loss' arguments to be able to incrementally train additional regressors, that are currently available in SkLearn in the form of non-incremental regressors (PoissonRegressor / GammaRegressor/TweedieRegressor).

Describe your proposed solution

Add additional loss function implementations (providing gradients) to support the additional regressor types.

Describe alternatives you've considered, if relevant

Learning with L1/L2 loss in log-space. But it doesn't work well when the label of a given sample is zero. Poisson regression handles it gracefully.

Additional context

No response

Activity

  1. removed
    Needs Triage
    on Aug 2, 2024
  2. ogrisel commented on Aug 2, 2024

    @ogrisel
    Member

    That should be doable indeed now that SGDRegressor has been refactored to reuse the loss functions from the shared sklearn.linear_model._loss module as part of #28049.

    Any opinion @lorentzenchr?

  3. lorentzenchr commented on Oct 14, 2024

    @lorentzenchr
    Member

    Very easy. Basically:

    • Allow a new loss function
    • Call inverse link function in predict
    • Think about tests
  4. added
    Moderate
    on Oct 14, 2024
  5. csking101 commented on Oct 25, 2024

    @csking101

    Hi, could I take up this issue?

  6. added a commit that references this issue on Nov 28, 2024
  7. Jacob-Lazar commented on Jan 22, 2025

    @Jacob-Lazar

    /take

  8. urmikakasi commented on Mar 13, 2026

    @urmikakasi

    Hello,
    I'd like to work on this. Since its been over a month with no activity I will be creating a new PR.

  9. lorentzenchr commented on Mar 15, 2026

    @lorentzenchr
    Member

    @urmikakasi You mean over a year. Go ahead.

  10. Nikolasioan commented on Apr 10, 2026

    @Nikolasioan

    /take

  11. urmikakasi commented on Apr 11, 2026

    @urmikakasi

    /take

    Hey, I'm currently working on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ModerateNew Featuremodule:linear_model

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions