Sampling from Posterior Distribution of GPR Model from fitrgp()
Ältere Kommentare anzeigen
I can get a gprMdl via:
rng(0,'twister');
N = 100;
x = linspace(-10,10,N)';
y = 1 + x*5e-2 + sin(x)./x + 0.2*randn(N,1);
gprMdl = fitrgp(x,y,'FitMethod','Exact','PredictMethod','Exact');
and the posterior covariance matrix via:
kfcn = gprMdl.Impl.Kernel.makeKernelAsFunctionOfXNXM(gprMdl.Impl.ThetaHat)
K = kfcn(x(1:5,:),x(1:7,:))
How can I go about sampling a model from the posterior distribution of gprMdl?
To clarify, I mean like the curves from the 2nd tile of:

Being able to do this is a matter of being able to finish up a graduate program, so any help is much appreciated!
1 Kommentar
Sterling Baird
am 6 Jan. 2021
Bearbeitet: Sterling Baird
am 6 Jan. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Gaussian Process Regression finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


