Wolfram 语言

增强的机器学习

可视化高斯过程模型的预测

用简单数据集培训高斯过程预测器.

In[1]:=
Click for copyable input
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 语言输入
In[2]:=
Click for copyable input
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"}]]
Out[2]=

相关范例

de en es fr ja ko pt-br ru