1. 程式人生 > >【Machine Learning】【Andrew Ng】- Quiz(Week 7)

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

1、Suppose you have trained an SVM classier with a Gaussian kernel, and it learned the following decision boundary on the training set:
這裡寫圖片描述
You suspect that the SVM is undertting your dataset. Should you try increasing or decreasing C? Increasing or decreasing sigma?
A. It would be reasonable to try decreasing C

. It would also be reasonable to try increasing sigma^2.
B. A. It would be reasonable to try increasing C. It would also be reasonable to try increasing sigma^2.
C. A. It would be reasonable to try decreasing C. It would also be reasonable to try decreasing sigma^2.
D. A. It would be reasonable to try increasing C
. It would also be reasonable to try decreasing sigma^2.
答案:D.
underfit,所以lambda過大,需要減小,所以C需要增大,sigma^2需要減小

2、The formula for the Gaussian kernel is given by similarity
這裡寫圖片描述
The figure below shows a plot of
這裡寫圖片描述
這裡寫圖片描述
Which of the following is a plot of
這裡寫圖片描述
A.
這裡寫圖片描述
B.
這裡寫圖片描述
C.
這裡寫圖片描述
D.
這裡寫圖片描述
答案:B。
sigma越小,約集中,越瘦。

3、The SVM solves
這裡寫圖片描述


where the functions cost0(z) and cost1(z) look like this:
這裡寫圖片描述
The first term in the objective is:
這裡寫圖片描述
This first term will be zero if two of the following four conditions hold true.
Which are the two conditions that would guarantee that this term equals zero?
A. 這裡寫圖片描述
B. 這裡寫圖片描述
C. 這裡寫圖片描述
D. 這裡寫圖片描述
答案:BD。
直接代入公式就可得到。

4、Suppose you have a dataset with n = 10 features and m = 5000 examples.
After training your logistic regression classier with gradient descent, you find that it has underfit the training set and does not achieve the desired performance on the training or cross validation sets.
A. Use an SVM with a linear kernel, without introducing new features.
B. Use an SVM with a Gaussian Kernel.
C. Create / add new polynomial features.
D. Increase the regularization parameter λ.
答案:BC.

5、Which of the following statements are true? Check all that apply.
A. Suppose you are using SVMs to do multi-class classification and would like to use the one-vs-all approach. If you have K different classes, you will train K- 1 different SVMs
B. The maximum value of the Gaussian kernel is 1
C. If the data are linearly separable, an SVM using a linear kernel will return the same parameters theta regardless of the chosen value of C (i.e., the resulting value of does not depend on C)
D. It is important to perform feature normalization before using the Gaussian kernel.
答案:BD
A錯誤,還不知道為什麼
B正確,取值範圍為0-1.
C.錯誤
D.正確,一定要記得先標準化