机器学习笔记之特征缩放
来源:互联网 发布:淘宝代购售假申诉 编辑:程序博客网 时间:2024/06/17 22:41
GradientDescent in Practice I - Feature Scaling
Note: [6:20 -The average size of a house is 1000 but 100 is accidentally written instead]
We can speed upgradient descent by having each of our input values in roughly the same range.This is because θ will descend quickly on small ranges and slowly on largeranges, and so will oscillate inefficiently down to the optimum when thevariables are very uneven.
The way toprevent this is to modify the ranges of our input variables so that they areall roughly the same. Ideally:
−1 ≤ x(i) ≤ 1
or
−0.5 ≤ x(i) ≤ 0.5
These aren'texact requirements; we are only trying to speed things up. The goal is to getall input variables into roughly one of these ranges, give or take a few.
Two techniquesto help with this are feature scaling and meannormalization. Feature scaling involves dividing the input values by therange (i.e. the maximum value minus the minimum value) of the input variable,resulting in a new range of just 1. Mean normalization involves subtracting theaverage value for an input variable from the values for that input variableresulting in a new average value for the input variable of just zero. Toimplement both of these techniques, adjust your input values as shown in thisformula:
xi:=(xi−μi)/si
Where μi isthe average of all the values for feature (i) and si is therange of values (max - min), or si is thestandard deviation.
Note thatdividing by the range, or dividing by the standard deviation, give differentresults. The quizzes in this course use range - the programming exercises usestandard deviation.
For example,if xi represents housing prices with arange of 100 to 2000 and a mean value of 1000, then, xi:=(price−1000)/1900.
- 机器学习笔记之特征缩放
- 【机器学习】特征缩放
- 机器学习--特征缩放/均值归一化
- 优达机器学习:特征缩放
- Udacity-机器学习入门-特征缩放
- 【机器学习入门】Andrew NG《Machine Learning》课程笔记之三:多元线性回归的梯度下降、特征缩放和正规方程
- 【斯坦福---机器学习】复习笔记之特征选择
- 机器学习笔记之特征及多项式回归
- 机器学习 特征工程之特征选择
- 机器学习 特征工程之特征选择
- 机器学习之特征工程-特征选择
- 机器学习之特征选择
- 机器学习之特征工程
- 机器学习之特征工程
- 机器学习 之 Haar特征
- 机器学习之 特征选择
- 机器学习 之 LBP特征
- 机器学习 之 Hog特征
- spring helloworld
- JSP 点击量统计
- 正则表达式-注册表验证
- Eclipse没有Apache tomcat v9.0 的创建选项
- POJ 2492 A Bug's Life
- 机器学习笔记之特征缩放
- 机器学习笔记之特征及多项式回归
- Eclipse中文乱码
- Python-multiprocessing-Pool模块
- JSP 自动刷新
- 又又一周了
- C语言 bool类型
- UVA
- Eclipse 安装(Neon 版本)