Fixing specific explicit basis coefficients in fitrgp()
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Kavya Vuriti
2019-8-8
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gaussian Process Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!