Skip to content

[MRG] removed hard coded kernel params in Nystroem#6145

Closed
mth4saurabh wants to merge 1 commit intoscikit-learn:masterfrom
mth4saurabh:fix-nystroem-interface
Closed

[MRG] removed hard coded kernel params in Nystroem#6145
mth4saurabh wants to merge 1 commit intoscikit-learn:masterfrom
mth4saurabh:fix-nystroem-interface

Conversation

@mth4saurabh
Copy link
Copy Markdown
Contributor

@mth4saurabh mth4saurabh changed the title removed hard coded kernel params in Nystroem [MRG] removed hard coded kernel params in Nystroem Jan 23, 2016
@amueller
Copy link
Copy Markdown
Member

amueller commented Oct 7, 2016

LGTM, thanks! Sorry for the slow reply :(

@amueller amueller changed the title [MRG] removed hard coded kernel params in Nystroem [MRG + 1] removed hard coded kernel params in Nystroem Oct 7, 2016
@amueller amueller added this to the 0.19 milestone Oct 7, 2016
@jnothman
Copy link
Copy Markdown
Member

Is it possible to add a test, @mth4saurabh?

@jnothman
Copy link
Copy Markdown
Member

apart from lacking a test, I don't really see how this is backwards-compatible, @amueller.

@amueller amueller changed the title [MRG + 1] removed hard coded kernel params in Nystroem [MRG] removed hard coded kernel params in Nystroem Jun 19, 2017
@amueller
Copy link
Copy Markdown
Member

This should be backwards-compatible. The degree and coef0 are only used for built-in kernels, where the default values are exactly the values that were passed here. The only situation that changes is that the behavior for gamma changes if the default value of gamma in the kernel function is not None. The only built-in kernel for which this is the case is chi2_kernel, for which None is an invalid value, so using the current default is not valid.

@amueller
Copy link
Copy Markdown
Member

What should the test be? That the default behavior is gamma=1 for kernel=chi2_kernel and gamma=None for kernel=rbf?

@amueller
Copy link
Copy Markdown
Member

amueller commented Jun 19, 2017

maybe it would even be better to deprecate the three parameters here, as the behavior of them not being passed to callable is a bit weird and can lead to subtle bugs?

@amueller
Copy link
Copy Markdown
Member

How about if a callable was passed and any of the parameters was not None, we error? That might error on currently running code, but probably code that had a bug?

@amueller
Copy link
Copy Markdown
Member

See #9166.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Jun 30, 2017

#9166 was merged. Closing.

@ogrisel ogrisel closed this Jun 30, 2017
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.

4 participants