How to model noise-free case and to obtain Covarince matrix after performing Gaussian process regression using fitrgp

2 次查看(过去 30 天)
Assume that there is a GP model constructed using D = {X, y} with fitrgp function, such that:
gprMdl = fitrgp(data.X, data.Y, 'KernelFunction', 'ardsquaredexponential', 'BasisFunction', 'none', 'verbose', 1, 'FitMethod',exact')
I have several question as follows:
1) In introduction of GPR, it says GPR can be used to model the noise and noise-free cases (two present figures in Gaussian Process Regression Models page of MATLAB). But I didn't find how to model noise-free (deterministic) case with fitrgp function.
2) How can I get the auxiliary terms (such as covarince matrix C=K(X,X), and its inverse) that are already used when training GPR? I know we can calculate them by ourselves, but if matlab can produce them or not according to users' selection, it may be better.I need these auxiliary terms to do things else.
HP

回答(1 个)

Gautam Pendse
Gautam Pendse 2018-2-6
You can set 'Sigma' to a small value and set a name value pair called ConstantSigma to true. That way the initial value specified in 'Sigma' will not be optimized.
Hope this helps,
Gautam
  2 个评论
Pengfei Wei
Pengfei Wei 2019-12-19
Thanks for you answer. I have made the set ('Sigma',0.0001,'ConstantSigma',true) for my test, but the sigma value in the trained GPR model turn out to be 0.0120. Since I also want to use the GPR model in a interpolation way, I am quite strugglling with this issue. Besides, can I get the covariance matrix of the training data directly from the trained model? Thank you!
Sterling Baird
Sterling Baird 2021-1-6
编辑:Sterling Baird 2021-1-6
For the sigma value, maybe try changing 'SigmaLowerBound' to a lower value (defaults to 1e-2*std(y)). If you figure this out, I'd be interested to know as well. Where are you checking to get 0.0120?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Gaussian Process Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by