Coursera Machine Learning 第三周 quiz Regularization

来源:互联网 发布:商陆花软件价格 编辑:程序博客网 时间:2024/05/29 07:12
1.

You are training a classification model with logistic

regression. Which of the following statements are true? Check

all that apply.

答案B

Introducing regularization to the model always results in equal or better performance on the training set.

Adding a new feature to the model always results in equal or better performance on the training set.

Adding many new features to the model helps prevent overfitting on the training set.

Introducing regularization to the model always results in equal or better performance on examples not in the training set.

2.Suppose you ran logistic regression twice, once with λ=0, and once with λ=1. One of the times, you got

parameters θ=[74.8145.05], and the other time you got

θ=[1.370.51]. However, you forgot which value of

λ corresponds to which value of θ. Which one do you

think corresponds to λ=1?

答案A   

θ=[1.370.51]

θ=[74.8145.05]

3.

Which of the following statements about regularization are

true? Check all that apply.

答案B

Using a very large value of λ cannot hurt the performance of your hypothesis; the only reason we do not set λ to be too large is to avoid numerical problems.

Using too large a value of λ can cause your hypothesis to underfit the data.

Because regularization causes J(θ) to no longer be convex, gradient descent may not always converge to the global minimum (when λ>0, and when using an appropriate learning rate α).

Because logistic regression outputs values 0hθ(x)1, it's range of output values can only be "shrunk" slightly by regularization anyway, so regularization is generally not helpful for it.


4.In which one of the following figures do you think the hypothesis has overfit the training set?




5.In which one of the following figures do you think the hypothesis has underfit the training set?




0 0
原创粉丝点击