可视化高斯过程模型的预测
用简单数据集培训高斯过程预测器.
In[1]:=
data = {-1.2 -> 1.2, 1.4 -> 1.4, 3.1 -> 1.8, 4.5 -> 1.6};
p = Predict[data, Method -> "GaussianProcess"]
Out[1]=
可视化带有置信区间的预测值.
显示完整的 Wolfram 语言输入
Out[2]=
用简单数据集培训高斯过程预测器.
data = {-1.2 -> 1.2, 1.4 -> 1.4, 3.1 -> 1.8, 4.5 -> 1.6};
p = Predict[data, Method -> "GaussianProcess"]
可视化带有置信区间的预测值.
Show[Plot[{
p[x],
p[x] + StandardDeviation[p[x, "Distribution"]],
p[x] - StandardDeviation[p[x, "Distribution"]]
}, {x, -2, 6}, PlotStyle -> {Blue, Gray, Gray},
Filling -> {2 -> {3}}, Exclusions -> False,
PerformanceGoal -> "Speed",
PlotLegends -> {"Prediction", "Confidence Interval"}],
ListPlot[List @@@ data, PlotStyle -> Red, PlotLegends -> {"Data"}]]