How to use Gaussian Process Regression with multidimension input with meanfunc?

14 views (last 30 days)
I have downloaded the Gaussian Processes for Machine Learning (GPML) package (gpml-matlab-v3.6-2015-07-07) from the website. The demo_regression for one dimension works just fine in the matlab.
Now I have my own data for regression where the xtrain (training data) is a 20*5 matrix (20 samples, 5 input vars), and the ytrain ( training target) is 20x1, test data xtest is (1x5), The problem is that I do not understand how to calculate the meanFunction, the code provided for the regression example does not work for multiple input datasets.
This is the error which appeared to me when I run the code:
..................................................................
Error using gp (line 90)
Number of mean function hyperparameters disagree with mean function
Error in minimize (line 75)
[f0 df0] = feval(f, X, varargin{:}); % get function value and gradient
Error in GPMLexample1 (line 108)
Ncg =50;hyp = minimize(hyp0,'gp', -Ncg, inf, mean, cov, lik,TrainingSetX_x, TrainingSetY_x); % opt hypers
...................................................................
Are there anybody who has tried this, and maybe can show an example?

Answers (2)

Don Mathis
Don Mathis on 7 Feb 2018
I suggest using the FITRGP function in the Statistics & Machine Learning Toolbox instead of GPML

LUIS PEJENDINO
LUIS PEJENDINO on 5 Aug 2021
what is meanfunc used for?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!