8000 [MRG] Set noise tunable by default by MechCoder · Pull Request #209 · scikit-optimize/scikit-optimize · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

[MRG] Set noise tunable by default #209

Merged
merged 4 commits into from
Aug 30, 2016

Conversation

MechCoder
Copy link
Member
@MechCoder MechCoder commented Aug 24, 2016

https://papers.nips.cc/paper/4522-practical-bayesian-optimization-of-machine-learning-algorithms.pdf advocates the use of setting noise as a tunable hyperparameter on the GP kernel.

nu=2.5)),
normalize_y=True, alpha=alpha, random_state=random_state)
kernel=cov_amplitude * matern + noise,
normalize_y=True, random_state=random_state)
Copy link
Member
@glouppe glouppe Aug 24, 2016

Choose a reason for hiding this comment

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

By default alpha in GaussianProcessRegressor is positive, which means noise can be controlled in two ways. Shall we fix alpha=0.0 instead here, since we have the noise component?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. But 10**-10 is still a small value no?. It is added to the covariance here (https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/gpr.py#L382)

@MechCoder
Copy link
Member Author

I am yet to see the implications of this on any example but I'm unlikely to get there before tomorrow.

@MechCoder
Copy link
Member Author

For the first time, I'm happy to see a build fail...

@MechCoder
Copy link
Member Author
MechCoder commented Aug 26, 2016

I think I broke something on sklearn master with this scikit-learn/scikit-learn@c31ad7a :/

Could you check if you are still able to run the bayesian optimisation notebook? The repr of "res.models" breaks.

@glouppe
Copy link
Member
glouppe commented Aug 26, 2016

Meh... :/ I'll check later...

@MechCoder
Copy link
Member Author

Couldn't help it.

htismpc

@MechCoder
Copy link
Member Author

Minimal code to reproduce:

matern = Matern(length_scale=np.ones(1))
ConstantKernel() * matern

@MechCoder MechCoder changed the title [MRG] Set noise tunable by defau 8000 lt [WIP] Set noise tunable by default Aug 26, 2016
@MechCoder
Copy link
Member Author

See: scikit-learn/scikit-learn#7259 for a fix

@MechCoder
Copy link
Member Author
MechCoder commented Aug 30, 2016

@glouppe I've pushed a temporary workaround and I've modified the example, which makes me think. should we keep alpha (maybe renamed to noise) with an option="auto"? It would be easier for people to play with their custom kernels without having to add a WhiteKernel (and set noise on or off using the noise option)

@@ -26,6 +26,6 @@ def test_gp_minimize():
yield (check_minimize, bench4, 0.0,
[("-2", "-1", "0", "1", "2")], search, acq, 0.05, 10)
yield (check_minimize, branin, 0.39, [(-5.0, 10), (0.0, 15.)],
search, acq, 0.1, 50)
Copy link
Member Author

Choose a reason for hiding this comment

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

I changed this because tests were failing.

@MechCoder MechCoder changed the title [WIP] Set noise tunable by default [MRG] Set noise tunable by default Aug 30, 2016
@glouppe
Copy link
Member
glouppe commented Aug 30, 2016

Looks ok. Feel free to merge if green.

@MechCoder MechCoder merged commit cdea6a6 into scikit-optimize:master Aug 30, 2016
@MechCoder MechCoder deleted the tune_noise branch August 30, 2016 17:19
@betatim betatim mentioned this pull request Sep 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0