Reputation: 66
I use GPML Matlab package for a 2-d large scale regression problem. As stated in the user manual (http://www.gaussianprocess.org/gpml/code/matlab/doc/) I induce inputs for large scale regression.
nu = fix(n/2); iu = randperm(n); iu = iu(1:nu); u = x(iu,:);
where n is the number of input variables.
It works fine if I have more than 2 inputs. But the inference method fails when I want to compute predictions for only one input i.e. 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.
Upvotes: 0
Views: 139
Reputation: 66
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. But the bug is, I use induced points of X (which is 10 dimensional),
u = X(iu,:);
Which is wrong! @noumenal : Looking at line 21 helped !Thanks
Upvotes: 2