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

14 visualizzazioni (ultimi 30 giorni)
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?
  2 Commenti
Karim kim
Karim kim il 18 Giu 2017
I've the same problem, please let me know if you figure out how to fix it.
Best regads
Karim
somi
somi il 6 Feb 2018
you should use The ARD SE covariance function for multi-dimensional inputs.

Accedi per commentare.

Risposte (2)

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

LUIS PEJENDINO
LUIS PEJENDINO il 5 Ago 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!

Translated by