-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
[MRG+1] Misleading gamma description (#8699) #8716
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
Conversation
sklearn/decomposition/kernel_pca.py
Outdated
| gamma : float, default=1/n_features | ||
| Kernel coefficient for rbf and poly kernels. Ignored by other | ||
| kernels. | ||
| Kernel coefficient for rbf, poly kernels, sigmoid, laplacian and chi2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
I think this might need to be fixed in many places. Do a git grep "gamma :"
|
@agramfort You are correct I missed them. Thank you for the tip with git grep. The new commit should have addressed them all. The only occurrences of 'gamma' that have not been changed are in the documentation for each individual kernel, and in 'Orthogonal Matching Pursuit' which uses parameter gamma but that is something else. |
TomDLT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I am wrong, but it seems you have not check if all kernels are valid in each class.
A lot of your doc changes are not valid, please double check my comments and update the doc accordingly.
| gamma : float, optional, default : 1/n_features | ||
| Kernel coefficient for rbf kernel. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is correct here. The other kernel are not used here.
| gamma : float | ||
| Parameter for rbf kernel | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct either. Only 'knn', 'rbf' strings are valid inputs
| gamma : float | ||
| Parameter for rbf kernel | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct
| gamma : float | ||
| parameter for rbf kernel | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct
sklearn/svm/classes.py
Outdated
| gamma : float, optional (default='auto') | ||
| Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct, laplacian and chi2 kernels are not valid
sklearn/svm/classes.py
Outdated
| gamma : float, optional (default='auto') | ||
| Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct, laplacian and chi2 kernels are not valid
sklearn/svm/classes.py
Outdated
| gamma : float, optional (default='auto') | ||
| Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct, laplacian and chi2 kernels are not valid
sklearn/svm/classes.py
Outdated
| gamma : float, optional (default='auto') | ||
| Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct, laplacian and chi2 kernels are not valid
sklearn/svm/classes.py
Outdated
| gamma : float, optional (default='auto') | ||
| Kernel coefficient for 'rbf', 'poly' and 'sigmoid'. | ||
| Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct, laplacian and chi2 kernels are not valid
* updated description of gamma to reflect correct usage
* Updated descriptions to match across files.
* locally the ./build_tools/travis/flake8_diff.sh passes
|
@TomDLT Thank you very much for the review and sorry for sloppy job. |
TomDLT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
thx @mppaskov |
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
…n#8716) [DOC] update description of gamma for kernel methods
Reference Issue
Fixes #8699
What does this implement/fix? Explain your changes.
Correct description of the gamma parameter and where it is used.
Any other comments?
This is my first PR so hopefully I did it correctly.