美文网首页
机器学习笔记 - 线性回归

机器学习笔记 - 线性回归

作者: 周云锋 | 来源:发表于2017-11-06 09:53 被阅读0次

概念:

Example: playing checkers.

E = the experience of playing many games of checkers

T = the task of playing checkers.

P = the probability that the program will win the next game.

线性回归:

  • 损失函数:


    损失函数.png
  • 梯度下降:

梯度下降.png 梯度下降求导.png

多维线性回归:

  • 基础


    多维线性方程.png
    转矩阵运算.png
  • 损失函数

同二维线性回归
  • 梯度下降
多维梯度下降.png In other words.png
其中,阿尔法即梯度下降步长。

需要合理取值,如果太小,收敛较慢;如果太大,可能无法收敛。

特征缩放

feature scaling.png
u : x平均值
s :max - min
示例
上述示例类型的特征缩放尤为重要

正规方程法

求解公式.png
通过矩阵运算,直接求解。
相对梯度下降法计算量大O(n3)。

其它方法

除梯度下降法和正规方程法,还有牛顿法、拟牛顿法、共轭梯度法等更简便的方法。

相关文章

网友评论

      本文标题:机器学习笔记 - 线性回归

      本文链接:https://www.haomeiwen.com/subject/memkmxtx.html