'GPR model with positive/negative sampling points becomes uniformly positive for large length scales

First, some context: For my current project, I am trying to construct a response surface/scalar function of two variables f(x,y) in order to determine an implicit function of the variables through the level set. This is done using four initial points bracketing the response surface, where additional samples will be taken along the zero level set of the initial interpolated function.

A GPR model was chosen for this rather than bilinear interpolation, due to desirable continuity properties as well as confidence bounds. However, I want to tune the hyper parameters such that, at least for the initial pass, the response surface roughly resembles a linear function. However, I'm not sure how to do so without essentially flattening the response surface (the MATLAB script with two sets of parameters is shown below). I was wondering if someone more knowledgeable on this subject could give me insight regarding how to properly tune these parameters.

M = 2;
meas_corners = [0.4, 339290*0.92;
        0.4, 339290*1.12;
        0.75, 339290*0.92;
        0.75, 339290*1.12]; % order: Vf, Kh
meas_locs_norm = [0 0; 0 1; 1 0; 1 1];
mode_1_meas = [0.019062;0.016274;-0.0089;-0.013364];

sigma0 = 0.01;
sigmaF0 = 1*std(mode_1_meas);
sigmaM0 = 1;
kparams0 = [sigmaM0; sigmaF0];
gprMdl = fitrgp(meas_locs_norm,mode_1_meas, ...
'KernelFunction','squaredexponential','KernelParameters', kparams0, 'Sigma', sigma0);

sigma0 = 0.01;
sigmaF0 = 1*std(mode_1_meas);
sigmaM0 = 4;
kparams0 = [sigmaM0; sigmaF0];
gprMdl = fitrgp(meas_locs_norm,mode_1_meas, ...
'KernelFunction','squaredexponential','KernelParameters', kparams0, 'Sigma', sigma0);

% plot ranges
vr = linspace(0.4, 0.7, 50);
kr = linspace(339290*0.92, 339290*1.12, 50);
vrn = linspace(0, 1, 50);
krn = linspace(0, 1, 50);
[VR, KR] = meshgrid(vr, kr);
[VRN, KRN] = meshgrid(vrn, krn);
eval_grid = [VRN(:) KRN(:)];
NR = zeros(size(VRN));
NR(:) = predict(gprMdl, eval_grid);
figure(3)
contourf(VR, KR, NR);
colorbar
xlabel('V')
ylabel('K_h')


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source