标准方程的证明
线性回归模型公式(第i个实例的预测值 y i ^ \hat{y_i} yi^):
y i ^ = θ 0 + θ 1 x i , 1 + θ 2 x i , 2 + . . . + θ n x i , n \hat{y_i}=\theta_0+\theta_1 x_{i,1}+\theta_2 x_{i,2} + ... + \theta_n x_{i,n} yi^=θ0+θ1xi,1+θ2xi,2+...+θnxi,n
转化成矩阵:
y i ^ = [ 1 x i , 1 x i , 2 ⋯ x i , n ] [ θ 0 θ 1 θ 2 ⋮ θ n ] \hat{y_i}= \begin{bmatrix} 1 & x_{i,1} & x_{i,2} & \cdots & x_{i,n} \end{bmatrix} \begin{bmatrix} \theta_0 \\ \theta_1 \\ \theta_2 \\ \vdots \\ \theta_n \end{bmatrix} yi^=[1xi,1xi,2⋯xi,n]⎣⎢⎢⎢⎢⎢⎡θ0θ1θ2⋮θn⎦⎥⎥⎥⎥⎥⎤
简化为:
y i ^ = x i T θ \hat{y_i}=\mathbf{x_i}^{T}\theta yi^=x</