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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!