question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gaussian Process kernel WhiteKernel has unhelpful "noise_level" documentation

See original GitHub issue

Description

The WhiteNoise class of kernel has an unhelpful and misleading description. It simply says “noise_level is a parameter”. It doesn’t say it corresponds to variance of a gaussian noise.

Steps/Code to Reproduce

From the docs

noise_level : float, default: 1.0 Parameter controlling the noise level

From the source

The main use-case of this kernel is as part of a sum-kernel where it explains the noise-component of the signal. Tuning its parameter corresponds to estimating the noise-level.

Expected Results

noise_level : float, default: 1.0 Parameter controlling the noise level (variance)

The main use-case of this kernel is as part of a sum-kernel where it explains the noise of a signal as Gaussian noise with variance equal to noise_level. Tuning its parameters corresponds to estimating the noise variance.

Versions

Not relevant

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joseortiz3commented, May 30, 2019

@bjfar Great work. Please edit the documentation and submit a pull request. Nobody else should have to go through this pain again. I already submitted a pull request to change WhiteKernel’s noise_parameter documentation, so all you need to change is the documentation for that alpha parameter.

1reaction
bjfarcommented, May 29, 2019

I found this StackOverflow question asking the same thing: https://stackoverflow.com/questions/54987985/using-scikit-learns-whitekernel-for-gaussian-process-regression

I think the answer given there is correct: the noise is not added to the prediction variance when you set “alpha” (this only affects the training stage, by considering the training data to be noisy), but it is added to the prediction variance when you use WhiteKernel. So the two approaches are absolutely not equivalent, and the documentation is wrong to claim that they are. When I manually add the noise into the prediction variance I see exact agreement, so this looks to be the problem.

Other than this, it looks like both parameters are indeed variances.

Figure_2

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.gaussian_process.kernels.WhiteKernel
The main use-case of this kernel is as part of a sum-kernel where it explains the noise of the signal as independently and...
Read more >
sklearn.gaussian_process._gpr - Scikit-Optimize
The implementation is based on Algorithm 2.1 of Gaussian Processes for ... from sklearn.gaussian_process.kernels import DotProduct, WhiteKernel >>> X, ...
Read more >
1.7. Gaussian Processes
This example illustrates that GPR with a sum-kernel including a WhiteKernel can estimate the noise level of data. An illustration of the log-marginal-likelihood ......
Read more >
SKlearn: Gaussian Process Regression not changed ...
The main use-case of the White kernel is as part of a sum-kernel where ... Tuning its parameter corresponds to estimating the noise-level: ......
Read more >
Gaussian Process Regression With Varying Noise
White noise kernel. To deal with noisy observations, a small constant \sigma_n^2 is customarily added to the diagonal of the covariance matrix ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found