필터 지우기
필터 지우기

Fixing specific explicit basis coefficients in fitrgp()

조회 수: 4 (최근 30일)
Hyunjung Lee
Hyunjung Lee 2019년 7월 21일
답변: Kavya Vuriti 2019년 8월 8일
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?

답변 (1개)

Kavya Vuriti
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.

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by