title: Modelling known noise with gaussian process model
body: <p>I need some help understanding how to model known noise using a Gaussian process model.</p>
  <p>I have some noisy data; for the purpose of this discussion lets say the noise is Gaussian.</p>
  <p>I can model this noise using a GP model with the following kernel.</p>
  <pre class="lang-py prettyprint-override"><code>k1 = Matern(length_scale=[3, 0.2, 0.2])
  k2 = WhiteKernel(noise_level=1)
  kernel = k1 + k2
  </code></pre>
  <p>I fit to the data, and get a nice result <a href="https://i.stack.imgur.com/UCmIB.png" rel="nofollow noreferrer">(image here - sorry I am apparently not allowed to post inline images?)</a></p>
  <p>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 <strong>will</strong> normally have an estimate of noise in advance, so I need to figure out how to model this noise without explicitly fitting the model.</p>
  <p>What I am confused about is how to interpret and set the <code>noise_level</code>. From what I have read in the docs, I should interpret <code>noise_level</code> 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 <code>0.5</code>, corresponding to a variance of <code>0.25</code>. This is correct - however, the <code>noise_level</code> in <code>gp.kernel_.k2.noise_level</code> is <code>1.09902</code>. 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 but<code>gp.kernel_.k2.noise_level</code> actually doesn't change at all...</p>
  <p>What I would like to do is be able to say &quot;In this data, I know that the noise is roughly <code>x</code>&quot; and then set up the kernel accordingly like this:</p>
  <pre class="lang-py prettyprint-override"><code>k1 = Matern()
  k2 = WhiteKernel(noise_level=something_derived_from_x, noise_level_bounds='fixed')
  kernel = k1 + k2
  </code></pre>
  <p>However, I cannot figure out how I should do this. I feel like I've fundamentally misunderstood something, can anyone help me out?</p>