← Back to Index
Research & Engineering Archive

LA Least Square

By Jingnan Huang · November 19, 2024 · 1199 Words

Last Edit: 11/19/24

Solution 解
#

Img

Least Error Solution (Optimization) 最优解
#

Img

R^3 Case
#

Img

Projection 投影
#

Img

Img

Least Squares 最小二乘
#

Img

$$A^T A = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} = 1^2 + 2^2 + 3^2 = 1 + 4 + 9 = 14$$ $$A^T b = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} = 1 \cdot 1 + 2 \cdot 2 + 3 \cdot 2 = 1 + 4 + 6 = 11 $$

Img

几何角度
#

Img

$$A^T A = \begin{bmatrix} 1 & 2 & 3 \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 & 1 \\ 2 & 1 \\ 3 & 1 \end{bmatrix} = \begin{bmatrix} 1^2 + 2^2 + 3^2 & 1 + 2 + 3 \\ 1 + 2 + 3 & 3 \end{bmatrix} = \begin{bmatrix} 14 & 6 \\ 6 & 3 \end{bmatrix}$$ $$A^T \mathbf{b} = \begin{bmatrix} 1 & 2 & 3 \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 2 \end{bmatrix} = \begin{bmatrix} 1 \cdot 1 + 2 \cdot 2 + 3 \cdot 2 \\ 1 \cdot 1 + 1 \cdot 2 + 1 \cdot 2 \end{bmatrix} = \begin{bmatrix} 11 \\ 5 \end{bmatrix}$$ $$\begin{bmatrix} 14 & 6 \\ 6 & 3 \end{bmatrix} \begin{bmatrix} w \\ b \end{bmatrix} = \begin{bmatrix} 11 \\ 5 \end{bmatrix} $$

Img

Img