
Gaussian Process Regression:I can plot the graphs using "fitrgp", but can I get the mean μ(x) and standard deviation sigma�(x)?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Xueheng Zhang
el 11 de Mayo de 2016
I can plot the graphs using "fitrgp", but can I get the mean μ(x) and standard deviation sigma(x)?
0 comentarios
Respuesta aceptada
mizuki
el 8 de Sept. de 2016
Editada: mizuki
el 8 de Feb. de 2017
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Gaussian Process Regression en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!