【Machine Learning】【Andrew Ng】- Quiz(Week 6)

  1. You train a learning algorithm, and find that it has unacceptably high error on the test set. You plot the learning curve, and obtain the figure below. Is the algorithm suffering from high bias, high variance, or neither?
    【Machine Learning】【Andrew Ng】- Quiz(Week 6)_第1张图片
    A. Neither
    B. High bias
    C. High variance
    答案:选B。high bias 和 high variance 表现在图里最大的区别就是gap。没有gap的一定是high bias。

  2. Suppose you have implemented regularized logistic regression to classify what object is in an image (i.e., to do object recognition). However, when you test your hypothesis on a new set of images, you find that it makes unacceptably large errors with its predictions on the new images. However, your hypothesis performs well (has low error) on the training set. Which of the following are promising steps to
    take? Check all that apply.
    A. Try using a smaller set of features.
    B. Try increasing the regularization parameter λ.
    C. Try decreasing the regularization parameter λ.
    D. Try evaluating the hypothesis on a cross validation set rather than the test set.
    答案:AB。训练集表现很好是属于high variance,为过拟合。所以可以改善模型的方法有A和B。特别注意,D选项错误,评价一个模型的性能只能用测试集,CV集是用来调整模型degree的,也就是特征的次数。

  3. Suppose you have implemented regularized logistic regression to predict what items customers will purchase on a web shopping site. However, when you test your hypothesis on a new set of customers, you find that it makes unacceptably large errors in its predictions. Furthermore, the hypothesis performs poorly on the training set. Which of the following might be promising steps to take? Check all that apply.
    A. Try evaluating the hypothesis on a cross validation set rather than the test set.
    B. Try decreasing the regularization parameter λ.
    C. Try adding polynomial features.
    D. Use fewer training examples.
    答案:BC。A选项不选原因同上。D,不管是哪种情况,为了提高模型性能,都需要更多的训练样本。

  4. Which of the following statements are true? Check all that apply.
    A. Suppose you are training a regularized linear regression model. The recommended way to choose what value of regularization parameter λ to use is to choose the value of λ which gives the lowest test set error.
    B. Suppose you are training a regularized linear regression model.The recommended way to choose what value of regularization parameter λ to use is to choose the value of λ which gives the lowest training set error.
    C. The performance of a learning algorithm on the training set will typically be better than its performance on the test set.
    D. Suppose you are training a regularized linear regression model. The recommended way to choose what value of regularization parameter λ to use is to choose the value of λ which gives the lowest cross validation error.
    答案:CD。C,不管是哪种情况,训练集的误差一般都是比测试集的误差大。D还不知道,欢迎评论补充,待更。

  5. Which of the following statements are true? Check all that apply.
    A. If a learning algorithm is suffering from high variance, adding more training examples is likely to improve the test error.
    B. If the training and test errors are about the same, adding more features will not help improve the results.
    C. A model with more parameters is more prone to overtting and typically has higher variance.
    D. If a learning algorithm is suffering from high bias, only adding more training examples may not improve the test error significantly.
    答案:ACD。增加样本数总是可以改善模型性能,所以A对B错。

next step type
Get more training examples High Variance
Try smaller sets of features High Variance
Try getting additional features High Bias
Try adding polynomial features High Bias
Try decreasing λ High Bias
Try increasing λ High Variance

你可能感兴趣的:(Machine,Learning,-,Andrew,Ng,机器学习)