Skip to content

Adding adaptive learning rate for MinibatchKmeans #30045

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

Conversation

BenJourdan
Copy link

@BenJourdan BenJourdan commented Oct 11, 2024

Reference Issues/PRs

None

What does this implement/fix? Explain your changes.

This request implements a recent learning rate for minibatch k-means which can be superior to the default learning rate. We implement this with the flag adaptive_lr that defaults to false.

Details can be found in this paper that appeared in ICLR 2023. Extensive experiments can be found in this manuscript - ignore the kernel k-means results. We also added a benchmark that produces the following plot which shows the learning rate is the same or better than the default on dense datasets.

image

Any other comments?

This is a reasonably small code change. We add a flag to the MinibatchKmeans constructor and the _k_means_minibatch.pyx cython file. The learning rate implementation is straightforward. In the benchmarks, it appears to take a few more iterations for the adaptive learning rate to converge, often resulting in better solutions. When we removed early stopping we observed the running time is about the same.

gregoryschwartzman and others added 30 commits October 7, 2024 15:36
feature. Added data and result to gitignore.
fixed bug in newlr
added various params for benchmarking
_minibatch_update_dense
…ifierCV` (scikit-learn#29634)

Co-authored-by: adrinjalali <adrin.jalali@gmail.com>
Co-authored-by: Lock file bot <noreply@github.com>
…earn#30017)

Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
…earn#30014)

Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
…ecate algorithm (scikit-learn#29997)

Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
kbharat1210 and others added 9 commits October 11, 2024 08:41
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
…30019)

Co-authored-by: Lock file bot <noreply@github.com>
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
…eep_empty_features=True (scikit-learn#29779)

Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
Copy link

github-actions bot commented Oct 11, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 35ebd8d. Link to the linter CI: here

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

Successfully merging this pull request may close these issues.