Learn Before
Concept

kernel SVM parameters in scikit-learn

  1. kernel = "linear": linear SVM
    equation example : 𝑘(𝑥1,𝑥2)=𝑥𝑇1𝑥2𝑘(𝑥1,𝑥2)=𝑥𝑇1𝑥2

  2. kernel = "poly": polynomial kernel
    equation example: 𝑘(𝑥1,𝑥2)=(y(𝑥T1𝑥2)+coef0)d𝑘(𝑥1,𝑥2)=(y(𝑥T1𝑥2)+coef0)d

    • gamma: 𝛾
    • coef0: 𝜃
    • degree: 𝑑
  3. kernel = "rbf" or kernel = None: RBF kernel. equation example: k(𝑥1,𝑥2)=exp(yx1x22)k(𝑥1,𝑥2)=exp(−y||x1−x2||2)

    • gamma: 𝛾
  4. kernel = "sigmoid": sigmoid kernel.
    equation example:𝑘(𝑥1,𝑥2)=tanh(y(𝑥𝑇1𝑥2)+coef0)𝑘(𝑥1,𝑥2)=tanh(y(𝑥𝑇1𝑥2)+coef0)

    • gamma: 𝛾
    • coef0: 𝜃

(Note: In the polynomial, RBF, and sigmoid kernels, the parameter gamma specifies the level of influence that a single training example has. The larger gamma is, the more influence a single example has)

0

2

Updated 2020-09-27

Tags

Data Science

Learn After