[英]Problem with implement a 4-D Gaussian Processes Regression through GPML
I refer to the link https://stats.stackexchange.com/questions/105516/how-to-implement-a-2-d-gaussian-processes-regression-through-gpml-matlab and create a 2-d Gaussian Process regression.我参考链接https://stats.stackexchange.com/questions/105516/how-to-implement-a-2-d-gaussian-processes-regression-through-gpml-matlab并创建一个二维高斯过程回归。 I want to create a 4-d Gaussian Process regression, however the 'meshgrid' only allows 3 inputs([X,Y,Z] = meshgrid(x,y,z))
;我想创建一个 4-d 高斯过程回归,但是 'meshgrid' 只允许 3 个inputs([X,Y,Z] = meshgrid(x,y,z))
; how do I add another input into meshgrid?如何在meshgrid中添加另一个输入?
The 3-d code is like: 3-d 代码是这样的:
X1train = linspace(-4.5,4.5,10);
X2train = linspace(-4.5,4.5,10);
X3train = linspace(-4.5,4.5,10);
X = [X1train' X2train' X3train'];
Y = [X1train + X2train + X3train]';
%Testdata
[Xtest1, Xtest2, Xtest3] = meshgrid(-4.5:0.1:4.5, -4.5:0.1:4.5, -4.5:0.1:4.5);
Xtest = [Xtest1(:) Xtest2(:) Xtest3(:)];
% implement regression
[ymu ys2 fmu fs2] = gp(hyp, @infExact, [], covfunc, likfunc, X, Y, Xtest);
If I create an X4train, that means I need an Xtest4, how do I add Xtest4 into meshgrid?如果我创建了一个 X4train,那就意味着我需要一个 Xtest4,我该如何将 Xtest4 添加到 meshgrid 中?
The GPML code is from http://www.gaussianprocess.org/gpml/code/matlab/doc/ GPML 代码来自http://www.gaussianprocess.org/gpml/code/matlab/doc/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.