I have a set of experimental data that I am trying to fit using Gaussian process regression (GPR) using Python's sklearn package. The only problem is that my data has an experimental standard deviation equal to 20% of its output. Can this dependency be handled in GPR?
In the code, the essential aspects are:
total_noise = 0.2*((numpy.abs(y))) #standard deviation # Instantiate a Gaussian Process model gp = GaussianProcessRegressor(kernel=kernel, alpha = total_noise**2., n_restarts_optimizer=100)
If my kernel is simply a radial basis function, then this results in:
$$k(x_i, x_j) = RBF(x_i, x_j) + 0.2 *y_i * \mathcal I (x_i * x_j)$$
But the problem appears to be that
alpha here is dependent on
y (my experimental output). Correct me if I am mistaken, but I believe this is okay when training. But I ultimately want both the computed mean and standard deviation from GPR, and I do not believe sklearn's GPR is accounting for this dependency on the output in
alpha since I would expect the predicted standard deviation, $\sigma^*$, to be smaller where the predicted output, $y^*$, is smaller. But this is not the case. My covariance itself appears to depend on $y$ because, in the model, $y$ exists on both sides of the sampling statement:
$$y \sim \mathcal N(0, \Sigma(y))$$
and I do not believe this is handled consistently. Is there a way to account for this dependency (i.e. my original data has a standard deviation of 20% in the y-axis) using sklearn's GPR?