Week7_1Support Vector Machinesg
Week7_1Support Vector Machinesg
第 1 题
Suppose you have trained an SVM classifier with a Gaussian kernel, and it learned the following decision boundary on the training set:
You suspect that the SVM is underfitting your dataset. Should you try increasing or decreasing ? Increasing or decreasing ?
- It would be reasonable to try decreasing . It would also be reasonable to try increasing .
- It would be reasonable to try decreasing . It would also be reasonable to try decreasing .
- It would be reasonable to try increasing . It would also be reasonable to try increasing .
- It would be reasonable to try increasing . It would also be reasonable to try decreasing .
* 答案: 4 *
* 对于: Large C: Lower bias, high variance; Small C: High bias, Low variance *
* 对于: Large : High bias, Low variance; Small : Low bias, high variance *
* 目前处于underfitting(欠拟合)状态, 需要减小bias, 增大variance *
第 2 题
The formula for the Gaussian kernel is given by .
The figure below shows a plot of when .
Which of the following is a plot of when ?
* 答案: 4 *
* 核函数为高斯时, 当减小时, less smoothly更陡了 *
第 3 题
The SVM solves
where the functions and 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?
- For every example with , we have that .
- For every example with , we have that .
- For every example with , we have that .
- For every example with , we have that .
* 答案: 1 2 *
* 时, SVM solves的右半部分为0, 只看左半部分. *
* 时, SVM solves的左半部分为0, 只看右半部分. *
第 4 题
Suppose you have a dataset with n = 10 features and m = 5000 examples.
After training your logistic regression classifier 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.
Which of the following might be promising steps to take? Check all that apply.
- Try using a neural network with a large number of hidden units.
- Reduce the number of examples in the training set.
- Use a different optimization method since using gradient descent to train logistic regression might result in a local minimum.
- Create / add new polynomial features.
* 答案: 1 4 *
* 当使用逻辑回归出现欠拟合(underfitting)时,可以使用神经网络或者增加多项式的特征或者带有高斯核的支持向量机 *
第 5 题
Which of the following statements are true? Check all that apply.
- Suppose you are using SVMs to do multi-class classification and would like to use the one-vs-all approach.
If you have different classes, you will train - 1 different SVMs. - If the data are linearly separable, an SVM using a linear kernel will return the same parameters regardless of the chosen value of (i.e., the resulting value of does not depend on ).
- The maximum value of the Gaussian kernel (i.e., ) is 1.
- It is important to perform feature normalization before using the Gaussian kernel.
* 答案: 3 4 *
* 选项1: 三分类时,要训练三个SVMs, 所以这儿的不对应该是 different SVMs *
* 选项2: 当C大或者小都会影响SVM的分类 *