Modelling known noise with gaussian process model

Viewed 36

I need some help understanding how to model known noise using a Gaussian process model.

I have some noisy data; for the purpose of this discussion lets say the noise is Gaussian.

I can model this noise using a GP model with the following kernel.

k1 = Matern(length_scale=[3, 0.2, 0.2])
k2 = WhiteKernel(noise_level=1)
kernel = k1 + k2

I fit to the data, and get a nice result (image here - sorry I am apparently not allowed to post inline images?)

In this case, I am fitting the kernel hyperparameters to the data, and everything seems to be working well. However, this is a rather artificial situation - normally I won't have the luxury of specifically feeding the GP multiple data points at the same parameter values, but I will normally have an estimate of noise in advance, so I need to figure out how to model this noise without explicitly fitting the model.

What I am confused about is how to interpret and set the noise_level. From what I have read in the docs, I should interpret noise_level parameter as 'corresponding to the variance of Gaussian noise'. In the case of the above data, following a model fit it predict the standard deviation is 0.5, corresponding to a variance of 0.25. This is correct - however, the noise_level in gp.kernel_.k2.noise_level is 1.09902. I would think there is some correspondence between this number and the predicted std, but I can't figure out what it is. Furthermore, when I perform the same experiment with the different data noise levels, the prediction of the standard deviation remains good butgp.kernel_.k2.noise_level actually doesn't change at all...

What I would like to do is be able to say "In this data, I know that the noise is roughly x" and then set up the kernel accordingly like this:

k1 = Matern()
k2 = WhiteKernel(noise_level=something_derived_from_x, noise_level_bounds='fixed')
kernel = k1 + k2

However, I cannot figure out how I should do this. I feel like I've fundamentally misunderstood something, can anyone help me out?

0 Answers
Related