Andrew Ng chapter5 多元线性回归

多元线性回归
Andrew Ng chapter5 多元线性回归

gradient descent for multiple linear regression

Andrew Ng chapter5 多元线性回归

cost function 有所改变

Andrew Ng chapter5 多元线性回归

feature scaling

Andrew Ng chapter5 多元线性回归
为了更快速的收敛,防止来回波动,进行特征缩放

均值归一化

Andrew Ng chapter5 多元线性回归

learning rate 判断working correctly

Andrew Ng chapter5 多元线性回归
Andrew Ng chapter5 多元线性回归
上述cost function 的异常现象都可能通过调节学习率来缓解。常用的学习率的取值:
Andrew Ng chapter5 多元线性回归

多项式回归以及特征的选择相关联

Andrew Ng chapter5 多元线性回归

normal equation 正规方程

Andrew Ng chapter5 多元线性回归
Andrew Ng chapter5 多元线性回归
偏导,set to 0,此时的Thera值,就是最小化cost function的Thera取值。使用正规方程时,可以不用做数据缩放。

Andrew Ng chapter5 多元线性回归
Andrew Ng chapter5 多元线性回归
Andrew Ng chapter5 多元线性回归

正规方程推导过程

Andrew Ng chapter5 多元线性回归

正规方程&梯度下降的优缺点

Andrew Ng chapter5 多元线性回归

特殊情况

Andrew Ng chapter5 多元线性回归