Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Plan for SGD and SAGA loss function migration #28049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lorentzenchr opened this issue Jan 2, 2024 · 2 comments
Closed

Plan for SGD and SAGA loss function migration #28049

lorentzenchr opened this issue Jan 2, 2024 · 2 comments

Comments

@lorentzenchr
Copy link
Member

lorentzenchr commented Jan 2, 2024

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
@github-actions github-actions bot added the Needs Triage Issue requires triage label Jan 2, 2024
@lorentzenchr
Copy link
Member Author

@thomasjpfan ping

@ogrisel
Copy link
Member

ogrisel commented Aug 2, 2024

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.

@ogrisel ogrisel closed this as completed Aug 2, 2024
@github-project-automation github-project-automation bot moved this from Discussion to Done in Losses and solvers Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants