Borrar filtros
Borrar filtros

ガウス過程回帰のドキュメントについて

3 visualizaciones (últimos 30 días)
Kenta
Kenta el 17 de Oct. de 2018
Comentada: Kenta el 18 de Oct. de 2018
下のアドレスにある、ガウス過程回帰のドキュメントを参考にさせて頂いております。 このページでの下にある図(タイトル:GPR fit -data perfect known)を自身のデータで再現したく存じます。 この図の作成に向けたドキュメンテーションがございましたら教えていただけますでしょうか。 https://jp.mathworks.com/help/stats/gaussian-process-regression-models.html?searchHighlight=GPR&s_tid=doc_srchtitle

Respuesta aceptada

Kazuya
Kazuya el 17 de Oct. de 2018
を参考にしたらそれっぽくできたのでサンプルとして使ってみてください。
% Generate the sample data.
x = [1,2,5,6,7,8]';
y = x.*sin(x);
% Fit a GPR model
gprMdl = fitrgp(x,y);
% Compute the predictions.
xnew = linspace(0,10,100)';
[ypred,~,yci] = predict(gprMdl,xnew);
% Plot the data along with the predictions and prediction intervals.
plot(x,y,'r*');
hold on
plot(xnew,ypred,'g-');
plot(xnew,yci(:,1),'k--');
plot(xnew,yci(:,2),'k--');
X = [xnew; flip(xnew)];
Y = [yci(:,2); flip(yci(:,1))];
pp = patch(X,Y,[0 0 0],'FaceAlpha',0.2);
xlabel('x');
ylabel('y');
hold off
  1 comentario
Kenta
Kenta el 18 de Oct. de 2018
回答いただき、誠にありがとうございました。 はい、このコードにて、作りたかった図を作成することができました。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!