728x90

https://wikidocs.net/26271

https://www.quora.com/What-is-RBF-kernel-in-SVM

 

 

Kernels in SVM classification: function that is responsible for defining the decision boundaries between the classes

-- classic linear kernel which assumes that the different classes are separated by a straight line
-- RBF (radial basis function) kernel is used when the boundaries are hypothesized to be curve-shaped

   => SVM classification에서 자주 사용됨


"SVM(서포트 벡터 머신) 모델"

에서도 커널을 사용하는데, 주로 rbf kernel을 사용한다.

 

(1) 데이터를 linear하게 분리

(2) 비선형의 경우 dimension을 늘려 linear로 분리

 

(1) linear classification(선형 분류): 데이터(서포트 벡터)로부터 여백(margin)이 최대선/면을 찾아 분류

*서포트 벡터: 선으로부터 가장 가까이 있는 데이터

*2차원에서는 선, 3차원에서는 면

 

 

(2) 비선형 분류

선형분류가 되지 않는 데이터라도, 상위 dimension으로 가면, 선형 분류 가능

-다항식 SVM (kernel='poly' 옵션)

-RBF SVM(kernel='rbf' 옵션)

 

    *커널 함수 (매핑 함수)
     : 새로운 특성 만들어 데이터를 상위 차원 공간으로 옮겨주는 함수

    *커널 트릭: 실제로 특성을 추가하지 않고도 특성을 추가한 것과 같은 효과를 내는 방법

 

(2)-2 커널함수의 종류

1. SVC

http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html

 

2. RBF SVM

model = SVC() #model = SVC(kernel='rbf')

 

3. 선형 SVM

model = SVC(kernel='linear')

 

4. 다항식 SVM

model = SVC(kernel='poly')

 

 

(2)-3 중요 하이퍼파라미터

728x90

+ Recent posts