Skip to content

Conversation

@mppaskov
Copy link
Contributor

@mppaskov mppaskov commented Apr 7, 2017

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.

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.
Copy link
Member

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 :"

@mppaskov
Copy link
Contributor Author

mppaskov commented Apr 8, 2017

@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.

Copy link
Member

@TomDLT TomDLT left a 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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

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

not correct

gamma : float, optional (default='auto')
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
Copy link
Member

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

gamma : float, optional (default='auto')
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
Copy link
Member

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

gamma : float, optional (default='auto')
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
Copy link
Member

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

gamma : float, optional (default='auto')
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
Copy link
Member

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

gamma : float, optional (default='auto')
Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.
Kernel coefficient for rbf, poly, sigmoid, laplacian and chi2 kernels.
Copy link
Member

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

@mppaskov
Copy link
Contributor Author

@TomDLT Thank you very much for the review and sorry for sloppy job.
I think I have now made the necessary corrections. I was more careful this time, following which kernels can be called from the given function.

Copy link
Member

@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

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

LGTM

@TomDLT TomDLT changed the title [MRG] Misleading gamma description (#8699) [MRG+1] Misleading gamma description (#8699) Apr 19, 2017
@agramfort agramfort merged commit 3a3637c into scikit-learn:master Apr 22, 2017
@agramfort
Copy link
Member

thx @mppaskov

Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
…n#8716)

[DOC] update description of gamma for kernel methods
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.

Misleading gamma description

3 participants