SumSquaredErrors 命令

SumSquaredErrors( <List of Points>, <Function> )

计算列表中点的 y 值与列表中 x 值的函数值之间的误差平方和(SSE)。

如果我们有一个点列表 L={(1, 2), (3, 5),(2, 2), (5, 2), (5, 5)} 并且例如计算了: f(x)=FitPoly(L,1) g(x)=FitPoly(L,2) . SumSquaredErrors(L,f) 得出 9 SumSquaredErrors(L,g) 得出 6.99 ,因此我们可以看出, g(x) 提供了最佳拟合,即在 最小误差平方和(高斯)的意义上。