Kernel SVMs

Bộ phân loại tuyến tính với Python

Michael (Mike) Gelbart

Instructor, The University of British Columbia

Transforming your features

Bộ phân loại tuyến tính với Python

Transforming your features

Bộ phân loại tuyến tính với Python

Transforming your features

$\textrm{transformed feature} =$

$ (\textrm{original feature})^2$

Bộ phân loại tuyến tính với Python

Transforming your features

$\textrm{transformed feature} =$

$ (\textrm{original feature})^2$

Bộ phân loại tuyến tính với Python

Transforming your features

$\textrm{transformed feature} =$

$ (\textrm{original feature})^2$

Bộ phân loại tuyến tính với Python

Kernel SVMs

from sklearn.svm import SVC

svm = SVC(gamma=1)    # default is kernel="rbf"

Bộ phân loại tuyến tính với Python

Kernel SVMs

from sklearn.svm import SVC

svm = SVC(gamma=0.01) # default is kernel="rbf"

  • smaller gamma leads to smoother boundaries
Bộ phân loại tuyến tính với Python

Kernel SVMs

from sklearn.svm import SVC

svm = SVC(gamma=2)    # default is kernel="rbf"

  • larger gamma leads to more complex boundaries
Bộ phân loại tuyến tính với Python

Let's practice!

Bộ phân loại tuyến tính với Python

Preparing Video For Download...