1.自动驾驶技术
回归问题:由于汽车尝试预测表示行驶方向的连续变量的值
2.房屋价格问题
1.一个特性情景
- m 表示训练样本的数目
- #tranning exaples
- x 输入变量
- “input”variable/feature
- y输出变脸
- “output”variable/target
- (x,y) one tranning example
- (Xi,Yi) ith tranning example
- h—hypothesis
- a good predictor for the corresponding value of y
2.线性回归
- Linear Regression(英)
- 增加了房间数,二维的输入数据。你可以选择其它的特性,有没有壁炉,洗浴间的数量…
- cost function
- pick or learn the parameters θ,make h(x) close to y,at least for the training examples we have
- 全程追求J(θ)的最小值
3.梯度下降
- Gradient Descent
- 当你在曲面上某一个点的时候,选择方向使得你的下降最快
- 依赖于参数初始值
- 首先对θ赋值,这个值可以是随机的,也可以让θ是一个全零的向量
- 改变θ的值,使得J(θ)按梯度下降的方向进行减少
- 重新选择一个初始点,陷入了局部最小点
We want to choose θ so as to minimize J(θ). To do so, lets use a search algorithm that starts with some “initial guess” for θ, and that repeatedly changes θ to make J(θ) smaller, until hopefully we converge to a value of θ that minimizes J(θ). Specifically, lets consider the gradient descent algorithm, which starts with some initial θ, and repeatedly performs the update:
- 仅有一个训练样本
- >have only one training example (x,y)
- For a single training example, this gives the update rule
- 派生出m个样本的公式
3.实际调试运行
未完…