8000 ENH Add gamma='scale' option to RBFSampler by glevv · Pull Request #24755 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH Add gamma='scale' option to RBFSampler #24755

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

Merged
merged 12 commits into from
Oct 28, 2022
Merged

Conversation

glevv
Copy link
Contributor
@glevv glevv commented Oct 25, 2022

Fixes #24748

What does this implement/fix? Explain your changes.

Added gamma='scale' option to RBFSampler;
Added small test for scale calculation, just like in svm test file (maybe excessive?);
Changed userdocs and parameter constraints accordingly.

Any other comments?

Also took the liberty to replace numpy calls on numbers to python functions, which should be faster. If it was unnecessary, I'll revert it.

@glevv glevv changed the title Rbf scale Add gamma='scale' option to RBFSampler Oct 25, 2022
@glevv glevv marked this pull request as ready for review October 25, 2022 19:26
Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments.

@glemaitre glemaitre changed the title Add gamma='scale' option to RBFSampler ENH Add gamma='scale' option to RBFSampler Oct 26, 2022
glevv and others added 5 commits October 26, 2022 13:21
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove both comments because the code is enough self-explantory. Otherwise LGTM.

Copy link
Member
@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @glevv. LGTM

@jeremiedbb jeremiedbb merged commit 61ae92a into scikit-learn:main Oct 28, 2022
@glevv glevv deleted the rbf-scale branch October 28, 2022 12:16
jjerphan pushed a commit to samronsin/scikit-learn that referenced this pull request Oct 28, 2022
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Oct 31, 2022
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
andportnoy pushed a commit to andportnoy/scikit-learn that referenced this pull request Nov 5, 2022
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option gamma='scale' and 'auto' to RBFSampler
3 participants
0