// construct kernel
rbf = GPy.kern.rbf(2)
noise = GPy.kern.white(2)kernel = rbf + noise
// create simple GP Model
m = GPy.models.SparseGPRegression(X,Y,kernel, num_inducing = num_inducing)
// contrain all parameters to be positive (but not inducing inputs)
m.set(".*len",2.)
m.checkgrad()
// optimize and plot
After Change
m = GPy.models.SparseGPRegression(X, Y, kernel=rbf, num_inducing=num_inducing)
// contrain all parameters to be positive (but not inducing inputs)
m[".*len"] = 2.
m.checkgrad()
// optimize and plot