less than 1 minute read

Tags: ,

Using An SVM

  • Using SVM software package to solve for parameters θ

  • Need to specify:

    • Choice of parameter C.
    • Choice of kenel (similarity function):
      • No kernel (“linear kernel”)
        Predict "y = 1" if θ ^T * x ≥ 0   
        θ0 + θ1x1 + ... θnxn ≥ 0,
        ---> n large, m small
      • Gaussian kernel: Imgur

DO perform feature scaling before using the Gaussian kernel


Other choices of kernel


Multi-class clasification


Logistic regression VS. SVMs

n = number of features
m = number of training examples
  • if n is large (relative to m):
    • Use logistic regeression, or SVM without a kernel (“linear kernel”)
  • if n is small, m is intermediate:
    • Use SVM with Gaussian kernel**
  • if n is small, m is large:
    • Create / add more feature, then use logistic regression or SVM without a kernel
  • Neural nerwork likely to work well for most of these settings, but may be slower to train.