简体   繁体   English

使用单一输入的GPML进行大规模回归

[英]Large scale regression using GPML with single input

I use GPML Matlab package for a 2-d large scale regression problem. 我将GPML Matlab程序包用于二维大规模回归问题。 As stated in the user manual ( http://www.gaussianprocess.org/gpml/code/matlab/doc/ ) I induce inputs for large scale regression. 如用户手册( http://www.gaussianprocess.org/gpml/code/matlab/doc/ )所述,我引入了用于大规模回归的输入。

nu = fix(n/2); iu = randperm(n); iu = iu(1:nu); u = x(iu,:);

where n is the number of input variables. 其中n是输入变量的数量。

It works fine if I have more than 2 inputs. 如果我有2个以上的输入,则效果很好。 But the inference method fails when I want to compute predictions for only one input ie n= 1 但是,当我只想为一个输入(即n = 1)计算预测时,推理方法就会失败

covfunc = @covSEiso;
likfunc = @likGauss;
n= 1;
nu = fix(n/2); 
iu = randperm(n);
iu = iu(1:nu);
u = X(iu,:);
meanfunc = @meanConst;
covfuncF = {@covFITC, {covfunc}, u};
ll = 1.0; sf = 1.0; 
hyp.cov = log([ll sf]);
sn = 0.1;  hyp.lik = log(sn);
hyp.mean = 0;
[mF s2F] = gp(hyp, @infFITC, [], covfuncF, likfunc, X(:,2), Y, X(:,2));

I want to use only the second coloumn of X as my input to GP and perform training with target Y. 我只想将X的第二个列用作GP的输入,并使用目标Y进行训练。

Found the bug! 发现了错误!

If I am using only 2 variables of X for training the model, the induced points should also be sampled for the same. 如果我仅使用X的2个变量来训练模型,则诱导点也应同样采样。 But the bug is, I use induced points of X (which is 10 dimensional), 但错误是,我使用X的诱导点(10维),

u = X(iu,:); 

Which is wrong! 哪有错! @noumenal : Looking at line 21 helped !Thanks @noumenal:看第21行有帮助!谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM