fitgpr gaussian regression parameters

Hello guys,
I am using Gaussian Process Regression 'fitgpr' to fit a model to my data (~ 17,500 x 3 input, 17,500 x1 output), it works perfect (very low loss value).
I want to compare with the polynomial fitting, I have the number of coefficients in polynomials but how to get them in fitgpr?
I believe the 'coefficients' in Gaussian are the mean & variance (right?) how to get them?
(Any help is appreciated, I am a bit confused, thank you)
Regards,
Sara

 Accepted Answer

A Gaussian Process Regression is a non-parametric model, which means it heavily depends of the training data you use. This means that, in this case, every training point will have a coefficient of it's own for the covariance/kernel function, which makes a comparison between Gaussian Process coefficients and Polynomial Coefficients impractical. For a better understanding of the method I would strongely suggest the following online book http://www.gaussianprocess.org/gpml/, specially the chapter 2 which focus on regression.
If you want to compare both methods my main recomendation is to used cross-validation. The simpliest way to do it is to divide your training data in two sets, a training and a validation one. You can then train both models in the training set and evaluate the loss in the test set. A Gaussian process is able to represent any dataset with 0 error depeding of your parameters, thus a cross validation is needed to really be able know if the model is good enough to be generalized.

4 Comments

Sara Hamdan
Sara Hamdan on 5 Apr 2020
Edited: Sara Hamdan on 5 Apr 2020
Thank you for your answer.
Actually I did divide the data to train 70% & test 30%, then I calculated the error on the test part (MSE ~10^-7)
But the problem is I can't find a metric to compare the performance of Gaussian and Polynomial. I have the coefficients & the power rank of polynomial but I don't know what to get from Gaussian. Can I get the kernel coefficients for example? or the model complexity?
In other words, as expected the Gaussian is better (less error) than other regression methods but maybe it is more complicated (needs more time in fitting, more resources...etc) so to give a resonable conclusion I should mention the pros & cons. Thats why I want some metrics that I can measure from gpr model.
Your metric is mostly your MSE error. From the Gaussian model parameters you can't expect to become such informations in a clear way. You could plot the standard deviation of your prediction points to say how uncertain is the model, although I'm not confident this means so much in your type of comparison. If your goal is to perform a comparison of pros and cons I would rather focus in the inherent properties of the algorithms, so:
Gaussian Pros: Better MSE results, robustness to noisy data, confidence range (easy to judge how confident is the model or how "good" is the sample)
Cons: More time to train, demands a lot of memory, variables can not be easily interpretable
Polynomial Pros: Model easy to interpret, quick training, model with low amount of coefficients
Cons: Not so robust to noise, worst MSE results, no sample depentend confidence interval
Ok it is more clear now, thank you so much
How can i use other evaluation metrics (https://au.mathworks.com/help/stats/gaussian-process-regressionmodels.html?searchHighlight=gaussian%20process%20regression%20model&s_tid=srchtitle_gaussian%2520process%2520regression%2520model_1)
for Gaussian process regression model, i.e CRPS or prediction interval coverage probability (PICP)?

Sign in to comment.

More Answers (1)

Hello
if i understood, you want to know the amount of parameters that was used in SVM, you can use the code from matlab `` Quantity_of_support_vectors = size (model.SupportVectors, 1) ''
on the other hand in the Gaussian process, I did not find how to obtain the number of parameters. it's always the same problem

Categories

Community Treasure Hunt

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

Start Hunting!