Gaussian Process Regression:I can plot the graphs using "fitrgp", but can I get the mean μ(x) and standard deviation sigma�(x)?

4 次查看(过去 30 天)
I can plot the graphs using "fitrgp", but can I get the mean μ(x) and standard deviation sigma(x)?

采纳的回答

mizuki
mizuki 2016-9-8
编辑:mizuki 2017-2-8
Yes. The first output argument of "resubPredict" is the mean and the second is the sigma. If you want to draw them, use errorbar.
% create samples
n = 10;
x = linspace(0.5,2.5,n)';
y = sin(10*pi.*x) ./ (2.*x)+(x-1).^4 + 1.5*rand(n,1);
% Gaussian Process Regression
gprMdl = fitrgp(x,y);
[ypred,ysd,yint] = resubPredict(gprMdl,'Alpha',0.01);
% draw samples and mean&variance
figure;
plot(x, y, 'o');
hold on;
errorbar(x, ypred,ysd)

更多回答(0 个)

类别

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