ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

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

2022-07-02 21:34:55  阅读:499  来源: 互联网

标签:吴恩达 logistic training cat Machine Learning model data regression


Practice quiz: Classification with logistic regression

第 1 个问题:Which is an example of a classification task?

【正确】Based on the size of each tumor, determine if each tumor is malignant (cancerous) or not.
Based on a patient's blood pressure, determine how much blood pressure medication (a dosage measured in milligrams) the patient should be prescribed.
Based on a patient's age and blood pressure, determine how much blood pressure medication (measured in milligrams) the patient should be prescribed.
【解释】This task predicts one of two classes, malignant or not malignant.

第 2 个问题:Recall the sigmoid function is g(z) = \frac{1}{1+e^{-z}},If z is a large positive number, then:

g(z) is near negative one (-1)
g(z) will be near 0.5
g(z) will be near zero (0)
【正确】g(z) is near one (1)
image

第 3 个问题:A cat photo classification model predicts 1 if it's a cat, and 0 if it's not a cat. For a particular photograph, the logistic regression model outputs g(z)g(z) (a number between 0 and 1). Which of these would be a reasonable criteria to decide whether to predict if it’s a cat?

【正确】Predict it is a cat if g(z) >= 0.5
Predict it is a cat if g(z) < 0.5
Predict it is a cat if g(z) = 0.5
Predict it is a cat if g(z) < 0.7
【解释】Think of g(z) as the probability that the photo is of a cat. When this number is at or above the threshold of 0.5, predict that it is a cat
image

第 4 个问题:True/False? No matter what features you use (including if you use polynomial features), the decision boundary learned by logistic regression will be a linear decision boundary.

【正确】False
True
【解释】The decision boundary can also be non-linear, as described in the lectures.

Practice quiz: Cost function for logistic regression

第 1 个问题:In this lecture series, "cost" and "loss" have distinct meanings. Which one applies to a single training example?

【正确】Loss
Cost
Both Loss and Cost
Neither Loss nor Cost
【解释】In these lectures, loss is calculated on a single training example. It is worth noting that this definition is not universal. Other lecture series may have a different definition.
image

第 2 个问题:For the simplified loss function, if the label y(i)=0, then what does this expression simplify to?

image

Practice quiz: Gradient descent for logistic regression

第1个问题:Which is the correct update step for

The update steps are identical to the update steps for linear regression.
【正确】The update steps look like the update steps for linear regression, but the definition of f_{\vec{w},b}(\mathbf{x}^{(i)})is different.
【解释】For logistic regression, f_{\vec{w},b}(\mathbf{x}^{(i)})is the sigmoid function instead of a straight line.
image

Practice quiz: The problem of overfitting

第1个问题:Which of the following can address overfitting?

【正确】Collect more training data
【解释】If the model trains on more data, it may generalize better to new examples.
【正确】Apply regularization
【解释】Regularization is used to reduce overfitting.
Remove a random set of training examples
【正确】Select a subset of the more relevant features.
【解释】If the model trains on the more relevant features, and not on the less useful features, it may generalize better to new examples.

第 2 个问题:You fit logistic regression with polynomial features to a dataset, and your model looks like this. What would you conclude? (Pick one)

image
The model has high variance (overfit). Thus, adding data is, by itself, unlikely to help much.
【正确】The model has high variance (overfit). Thus, adding data is likely to help
The model has high bias (underfit). Thus, adding data is, by itself, unlikely to help much.
The model has high bias (underfit). Thus, adding data is likely to help
【解释】The model has high variance (it overfits the training data). Adding data (more training examples) can help.

第 3 个问题:Suppose you have a regularized linear regression model. If you increase the regularization parameter λ, what do you expect to happen to the parameters w1,w2,...,wn

【正确】This is will reduce the size of the parameters w1,w2,..., wn
This will increase the size of the parameters w1,w2,..., wn
【解释】Regularization reduces overfitting by reducing the size of the parameters w1,w2,...wn
image

标签:吴恩达,logistic,training,cat,Machine,Learning,model,data,regression
来源: https://www.cnblogs.com/chuqianyu/p/16438590.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有