吴恩达Coursera, 机器学习专项课程, Machine Learning:Supervised Machine Learning: Regression and Classification第二...

Practice quiz: Multiple linear regression

第 1 个问题:In the training set below, what is x_4^{(3)}? Please type in the number below (this is an integer such as 123, no decimal points).

image

第 2 个问题:Which of the following are potential benefits of vectorization? Please choose the best option.

It makes your code run faster
It can make your code shorter
It allows your code to run more easily on parallel compute hardware
【正确】All of the above
【解释】Correct! All of these are benefits of vectorization!

第 3 个问题:True/False? To make gradient descent converge about twice as fast, a technique that almost always works is to double the learning rate alphaalpha.

【正确】False
True
【解释】Doubling the learning rate may result in a learning rate that is too large, and cause gradient descent to fail to find the optimal values for the parameters ww and bb.

Practice quiz: Gradient descent in practice

第 1 个问题:Which of the following is a valid step used during feature scaling?

Add the mean (average) from each value and and then divide by the (max - min).
【正确】Subtract the mean (average) from each value and then divide by the (max - min).
【解释】This is called mean normalization.image

第 2 个问题:Suppose a friend ran gradient descent three separate times with three choices of the learning rate \alphaα and plotted the learning curves for each (cost J for each iteration). For which case, A or B, was the learning rate α likely too large?

case A only
【正确】case B only
Neither Case A nor B
Both Cases A and B
【解释】The cost is increasing as training continues, which likely indicates that the learning rate alpha is too large.image

第 3 个问题:Of the circumstances below, for which one is feature scaling particularly helpful?

Feature scaling is helpful when all the features in the original data (before scaling is applied) range from 0 to 1.
【正确】Feature scaling is helpful when one feature is much larger (or smaller) than another feature.
【解释】For example, the “house size” in square feet may be as high as 2,000, which is much larger than the feature “number of bedrooms” having a value between 1 and 5 for most houses in the modern era.

第 4 个问题:You are helping a grocery store predict its revenue, and have data on its items sold per week, and price per item. What could be a useful engineered feature?

For each product, calculate the number of items sold divided by the price per item.
【正确】For each product, calculate the number of items sold times price per item.
【解释】This feature can be interpreted as the revenue generated for each product.

第 5 个问题 True/False? With polynomial regression, the predicted values f_w,b(x) does not necessarily have to be a straight line (or linear) function of the input feature x.

False
【正确】True
【解释】A polynomial function can be non-linear. This can potentially help the model to fit the training data better.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ZhemgLee

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值