机器学习的均值归一化方法

Suppose m=4 students have taken some class,and the class had a midterm exam and a final exam. You have collected a datasetof their scores on the two exams, which is as follows:

midterm exam

(midterm exam)2

final exam

89

7921

96

72

5184

74

94

8836

87

69

4761

78

You'd like to use polynomial regressionto predict a student's final exam score from their midterm exam score.Concretely, suppose you want to fit a model of the form , where is the midterm score and  is (midterm score)2. Further, youplan to use bothfeature scaling (dividing by the "max-min", or range, of afeature) and mean normalization.

What is the normalized feature ? (Hint: midterm = 89, final = 96 is training example 1.)Please round off your answer to two decimal places and enter in the text boxbelow.

这是吴恩达机器学习的一道测试题,第一次做没有理解youplan to use bothfeature scaling (dividing by the "max-min", or range, of afeature) and mean normalization的意思所以做错了。从翻译来看这里应该是要求同时使用特征缩放和均值归一化来计算标准化后的特征,特征缩放时要除以max-min或者特征的范围。

常用的归一化方法有:

一、min-max标准化(Min-Max Normalization)

也称为离差标准化,是对原始数据的线性变换,使结果值映射到[0 - 1]之间。转换函数如下:

clip_image002

二、Z-score标准化方法

这种方法给予原始数据的均值(mean)和标准差(standard deviation)进行数据的标准化。经过处理的数据符合标准正态分布,即均值为0,标准差为1,转化函数为:

clip_image004

三、均值归一化

 

根据翻译知道我们应该采用均值归一化中以max-min为分母的归一化方法

计算结果是x1 =( 89 - (89+72+94+69)/4)/(96-69)=0.32

 

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值