-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
BenJourdan
wants to merge
47
commits into
scikit-learn:main
from
gregoryschwartzman:feature_mbkm_newlr
Closed
Adding adaptive learning rate for MinibatchKmeans #30045
BenJourdan
wants to merge
47
commits into
scikit-learn:main
from
gregoryschwartzman:feature_mbkm_newlr
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feature. Added data and result to gitignore.
fixed bug in newlr added various params for benchmarking
_minibatch_update_dense
…#30018) Co-authored-by: Lock file bot <noreply@github.com>
…30020) Co-authored-by: Lock file bot <noreply@github.com>
…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>
…cikit-learn#29996) Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.