最小二乘

y = C+ Dt
最佳总误差最小(optimal = overall error as small as I can)
make it
⎩⎨⎧C+D=1C+2D=2C+3D=2
联立无解,但可以有最优解(they don’t have a solution.but they 've got a best solution)
Ax = b
⎣⎡111123⎦⎤[CD] =⎣⎡123⎦⎤
Minimize: ∣∣Ax−b∣∣2=∣∣e∣∣2
=e12+e22+e32
=(C+D−1)2+(C+2D−2)2+e32
实际上做的是线性回归分析
(It’s going to do regression here,linear regression)
最小二乘(Least squares)应用最为广泛,但是有点太容易受到离群量(outliners)的影响
(because it’s a little overcomplensates for outliners)
Find x=[CD],P
“^” 为最优的估计(they 're the estimated the best line, not the perfect line)
{AT.A.x=AT.bP=Ax
[111213]⎣⎡111123∣ 1∣ 2∣ 2⎦⎤ =[36614∣ 5 ∣ 11]
正规方程组(normal equation): {3C+6D=56C+14D=11
{C=32D=21
∴ Best line: y=32+21t
⎩⎨⎧e1=−1/6e2=+2/6e3=−1/6
b = P+ e
⎣⎡122⎦⎤=⎣⎡7/65/313/6⎦⎤ +⎣⎡−1/62/6−1/6⎦⎤
最小二乘:最典型的应用就是拟合最优直线
(the special but most important example of fitting by straight line)