Skip to content

power_t: does it make sense for this parameter to have negative values #22178

Closed

Description

@reshamas

sklearn/linear_model/_stochastic_gradient.py

Ref #22115

I do not anticipate negative power_t to be mathematically meaningful but apparently our code accepts it without crashing... So ok with documenting it.

Originally posted by @ogrisel in #22115 (comment)

@thomasjpfan

I feel like this a case where documenting -inf will lead to more people trying out. If this is not mathematically meaningful, then we could be promoting a bad practice?

cc: @glemaitre

Activity

  1. added
    Needs Triage
    on Jan 10, 2022
  2. added and removed
    Needs Triage
    on Feb 10, 2022
  3. urbanophile commented on Mar 30, 2024

    @urbanophile

    My $0.02 is that this should be restricted to (0, inf). I have only heard of people wanting to increase the learning rate when doing something like cosine annealing, a linear warmup and decay or a cyclic learning rate for much more complicated deep neural networks. In the context of a linear classifier, I think you want the whole method to be pretty well-behaved, and the algorithm will not converge if the learning rate increases.

    So, I'm happy to change this and submit a pull request if other people are agreeable.

  4. lorentzenchr commented on Jan 24, 2025

    @lorentzenchr
    Member

    Yes, we should limit power_t to [0, infinity).

  5. ritvi-alagusankar commented on Jun 3, 2025

    @ritvi-alagusankar
    Contributor

    @lorentzenchr I've opened #31474 to address this issue. This is my first contribution, so please let me know if any changes are needed.

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

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