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)?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!