Fixing specific explicit basis coefficients in fitrgp()

3 views (last 30 days)
I have a training data with an n by 4 input, xd, an n by 1 response, yd. Out of the four input variables, two of them are spatial coordinates. For those two, I want to force the explicit basis coefficients (gp.Beta) to be constant 0.
To do that, I used a custom handle function, hfcn = @(X) [ones(size(X,1),1), ones(size(X,1),1), ones(size(X,1),1), X(:,3), X(:,4)]. When I fit Gaussian Process (GP) regression model using gp = fitrgp(xd, yd, 'Basis', H, 'FitMethod', 'exact', 'PredictMethod', 'exact', 'KernelFunction', 'ardmatern52', 'Sigma', 0.001), only the first two gp.Beta components are zeros, while I want the second and the third gp.Beta terms to be 0 (i.e., The fit is giving me gp.Beta = [0 0 a b c], whereas I want gp.Beta = [d 0 0 e f]).
How can I force specific gp.Beta components for specific variables to be zero?

Answers (1)

Kavya Vuriti
Kavya Vuriti on 8 Aug 2019
fitrgp function uses “quasinewton” as the default optimizer which is unconstrained. Try changing the optimizer to constrained optimizer like “fmincon” where the bounds on the basis coefficients can be specified.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!