I am using the GPML matlab code found here. I have been using a squared exponential cov function with ARD. I am finding that if I use the minimise function to train the process I get uniform large vales for the output variance. I would expect the variance to be larger where there is no training values, however it is not. Could anyone give me an idea of where I might be going wrong?

I have included my code below:

clear all
close all

z = linspace(0, 40, 101)';

meanfunc = {@meanSum, {@meanLinear, @meanConst}};
covfunc =  @covSEard;
hyp2.cov = [1;0.1];
hyp2.lik = log(0.1);

hyp2 = minimize(hyp2, @gp, -100, @infExact, meanfunc, covfunc, likfunc, x, y);

nlml2 = gp(hyp2, @infExact, meanfunc, covfunc, likfunc, x, y);

[m s2] = gp(hyp2, @infExact, meanfunc, covfunc, likfunc, x, y, z);
f = [m+2*sqrt(s2); flipdim(m-2*sqrt(s2),1)];
fill([z; flipdim(z,1)], f, [7 7 7]/8)
hold on; plot(z, m); %plot(x, y, '+')


I have also included the plots: Firstly with the minimise function being used to optimise hyperparameters enter image description here

And secondly without the minimise function being used:

enter image description here


Have you checked the hyper-parameters after using minimise function?

You might notice that your regression line with minimising nlml is roughly linear, so i guess you simply fall into a crazy local minimum on hyperparameter.

Beside I can't see the point of using ARD cov function since your x is one dimensional.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.