Ticker

6/recent/ticker-posts

Coursera: Machine Learning (Week 7) Quiz - Support Vector Machines | Andrew NG

 

 Recommended Courses:

1.Support Vector Machines.

Don't just copy & paste for the sake of completion. The solutions uploaded here are only for reference.They are meant to unblock you if you get stuck somewhere.Make sure you understand first.
  1. Suppose you have trained an SVM classifier with a Gaussian kernel, and it learned the following decision boundary on the training set:
    enter image description here
    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 C. It would also be reasonable to try increasing .

    •  It would be reasonable to try decreasing C. It would also be reasonable to try decreasing .

    •  It would be reasonable to try increasing C. It would also be reasonable to try decreasing .

    •  It would be reasonable to try increasing C. It would also be reasonable to try increasing .

  1. Suppose you have trained an SVM classifier with a Gaussian kernel, and it learned the following decision boundary on the training set:
    enter image description here
    When you measure the SVM’s performance on a cross validation set, it does poorly. Should you try increasing or decreasing ? Increasing or decreasing ?

    •  It would be reasonable to try decreasing C. It would also be reasonable to try increasing .

    •  It would be reasonable to try decreasing C. It would also be reasonable to try decreasing .

    •  It would be reasonable to try increasing C. It would also be reasonable to try decreasing .

    •  It would be reasonable to try increasing C. It would also be reasonable to try increasing .
  1. The formula for the Gaussian kernel is given by similarity
    .
    The figure below shows a plot of  when .

    enter image description here
    Which of the following is a plot of  when ?

    •  Figure 1:
      enter image description here

    •  Figure 2:
      enter image description here  ANSWER

    •  Figure 3:
      enter image description here

    •  Figure 4:
      enter image description here



  1. The SVM solves

    where the functions  and  look like this:

    enter image description here
    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  = 0, we have that θT  ≤ −1.
    •  For every example with  = 1, we have that θT  ≥ 0.

    •  For every example with  = 0, we have that θT  ≤ 0.

    •  For every example with  = 1, we have that θT  ≥ 1.


  1. 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.

    •  Increase the regularization parameter λ.

    •  Use an SVM with a Gaussian Kernel.
    •  Create / add new polynomial features.
    •  Use an SVM with a linear kernel, without introducing new features.

    •  Try using a neural network with a large number of hidden units.

    •  Reduce the number of example in the training set.

  1. 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 K different classes, you will train K-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 C (i.e., the resulting value θ of does not depend on C).

    •  It is important to perform feature normalization before using the Gaussian kernel.
    •  The maximum value of the Gaussian kernel (i.e., ) is 1.
    •  Suppose you have 2D input examples (ie, ). The decision boundary of the SVM (with the linear kernel) is a straight line.
    •  If you are training multi-class SVMs with one-vs-all method, it is not possible to use a kernel.
      • 一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一一
      •  Machine Learning Coursera-All weeks solutions [Assignment + Quiz]   click here
                                                                                      &
                               Coursera Google Data Analytics Professional Quiz Answers   click here


      Have no concerns to ask doubts in the comment section. I will give my best to answer it.
      If you find this helpful kindly comment and share the post.
      This is the simplest way to encourage me to keep doing such work.


      Thanks & Regards,
      - Wolf

Post a Comment

0 Comments