1、超定方程组
粗糙的解释:方程的个数比未知数还多。
超定方程组是指方程个数大于未知量个数的方程组。对于方程组Ra=y,R为n×m矩阵,如果R列满秩,且n>m。则方程组没有精确解,此时称方程组为超定方程组。
2、最小二乘法求解
E
(
x
)
=
∥
A
x
−
b
∥
2
=
(
A
x
−
b
)
T
(
A
x
−
b
)
=
(
x
T
A
T
−
b
T
)
(
A
x
−
b
)
=
x
T
A
T
A
x
−
b
T
A
x
−
x
T
A
T
b
+
b
T
b
=
x
T
A
T
A
x
−
(
A
T
b
)
T
x
−
(
A
T
b
)
T
x
+
b
T
b
\begin{array}{l} E(\mathbf{x})=\|\mathbf{A} \mathbf{x}-\mathbf{b}\|^{2} \\ =(\mathbf{A} \mathbf{x}-\mathbf{b})^{T}(\mathbf{A} \mathbf{x}-\mathbf{b}) \\ =\left(\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}}-\mathbf{b}^{\mathbf{T}}\right)(\mathbf{A} \mathbf{x}-\mathbf{b}) \\ =\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\mathbf{b}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{b}+\mathbf{b}^{\mathbf{T}} \mathbf{b} \\ =\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\left(\mathbf{A}^{\mathbf{T}} \mathbf{b}\right)^{\mathrm{T}} \mathbf{x}-\left(\mathbf{A}^{\mathrm{T}} \mathbf{b}\right)^{\mathrm{T}} \mathbf{x}+\mathbf{b}^{\mathrm{T}} \mathbf{b} \end{array}
E(x)=∥Ax−b∥2=(Ax−b)T(Ax−b)=(xTAT−bT)(Ax−b)=xTATAx−bTAx−xTATb+bTb=xTATAx−(ATb)Tx−(ATb)Tx+bTb
∂
E
∂
x
=
2
A
T
A
x
−
2
A
T
b
=
0
\frac{\partial E}{\partial \mathbf{x}}=2 \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-2 \mathbf{A}^{\mathrm{T}} \mathbf{b}=0
∂x∂E=2ATAx−2ATb=0
x
=
(
A
T
A
)
−
1
A
T
b
\mathbf{x}=\left(\mathbf{A}^{T} \mathbf{A}\right)^{-1} \mathbf{A}^{T} \mathbf{b}
x=(ATA)−1ATb
关于矩阵求导可以看这个应该够了:
https://zhuanlan.zhihu.com/p/273729929