吴恩达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.

posted @   楚千羽  阅读(1557)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示