Skip to content

Plan for SGD and SAGA loss function migration #28049

Closed

Description

@lorentzenchr

As a result of #15123, we now have a common private loss function module under sklearn._loss. In sklearn.linear_models we have 2 algorithms that need Cython version that calculate losses and gradients on single values (not on arrays), namely

  • _plain_sgd as used in SGDClassifier, SGDRegressor and SGDOneClassSVM; and
  • sag_solver as used in LogisticRegression.

My plan is to break this migration into smaller steps:

  1. DEP deprecate loss_function_ attribute in SGDClassifier and SGDOneClassSVM #27979 Deprecate loss_function_ attribute in v1.4 which gives access to the Cython loss functions that we want to replace.
  2. MNT replace Cython loss functions in SGD part 1 #27999 change order of Cython loss function arguments to align with the ones in sklearn._loss.
  3. Carry out the deprecation after release 1.5 (to be released with 1.6)
    MNT remove deprecated loss_function_ in SGD #29095
  4. ENH replace Cython loss functions in SGD part 2 #28029 Replace Cython losses with the ones from sklearn._loss, except multinomial one
  5. MNT replace Cython loss functions in SGD part 3 #28037 Replace the multinomial loss

Activity

  1. added
    Needs Triage
    on Jan 2, 2024
  2. lorentzenchr commented on Jan 2, 2024

    @lorentzenchr
    MemberAuthor
  3. removed
    Needs Triage
    on Jan 12, 2024
  4. added this to the 1.6 milestone on Jan 27, 2024
  5. moved this to Discussion in Losses and solverson May 17, 2024
  6. ogrisel commented on Aug 2, 2024

    @ogrisel
    Member

    Since all the items in the initial plan have been merged, let's close this issue. We can always open dedicate PRs for follow-up work.

  7. moved this from Discussion to Done in Losses and solverson Aug 2, 2024
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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions