scikit-learn GaussianProcessRegressor vs GaussianProcess? Why was GaussianProcess deprecated in version 0.18?

2.6k views Asked by At

I am trying to use kriging(gaussian process) regression with a constant term and generalized exponential correlation model. I was able to do this in older version with GaussianProcess function (version 0.17.1). When I use it, I get a warning saying

deprecationWarning: Class GaussianProcess is deprecated; GaussianProcess was deprecated in version 0.18 and will be removed in 0.20. Use the GaussianProcessRegressor instead.

However, I can't find similar options with GaussianProcessRegressor. I wonder if I can do the same with GaussianProcessRegressor or scikit-learn doesn't plan to support this functionality anymore.

2

There are 2 answers

2
tupui On

Yes you can.

The GaussianProcessRegressor class can be used as a drop-in replacement. By default, it uses a RBF Kernel. Thus depending on your case, you can set the Kernel accordingly. See Rasmussen. Indeed, the purpose of this new class is to implement GP according to this bible.

0
optimizationguy On

GaussianProcess function (version 0.17.1) is based on DACE package and provides two options: trend term and correlation term.

  1. Trend term in Kriging can be set to constant or polynomials such as linear, quadratic. GaussianProcessRegressor assumes a constant trend term which is mean of the training data. It does not support Kriging with trend. However, this is not a major issue because literature suggests that having complicated trend term might not help much. See (Chen, 2016) for example.

  2. Correlation term in GaussianProcess is similar to correlation kernels in GaussianProcessRegressor, latter being more flexible. RBF kernel is similar to squared exponential kernel in a slightly different form. (Instead of exp(-theta * (distance)^2) is replaced by exp(-theta*(distance)^2/length^2).

Finally, process variance in GaussianProcess is obtained by an analytical expression whereas in GaussianProcessRegressor it is obtained by maximizing likelihood estimator.

References:

S. N. Lophaven, H. B. Nielsen, J. Sondergaard, DACE-A MATLAB Kriging toolbox, version 2.0, Tech. Rep., 2002a.

H. Chen, J. L. Loeppky, J. Sacks, W. J. Welch, et al., Analysis Methods for Computer Experiments: How to Assess and What Counts?, Statistical Science 31 (1) (2016) 40-60.