gamma=0.1로 지정한 매개변수 를 잘 이해하기 위해 붓꽃 데이터셋에서 RBF 커널 SVM을 적용해 보죠.

    >>> svm = SVC(kernel='rbf', random_state=1, gamma=0.2, C=1.0)
    >>> svm.fit(X_train_std, y_train)
    >>> plot_decision_regions(X_combined_std,
    ...                       y_combined, classifier=svm,
    ...                       test_idx=range(105,150))
    >>> plt.xlabel('petal length [standardized]')
    >>> plt.ylabel('petal width [standardized]')
    >>> plt.legend(loc='upper left')
    >>> plt.tight_layout()
    >>> plt.show()

    비교적 값을 작게 했기 때문에 RBF 커널 SVM 모델이 만든 결정 경계는 그림 3-15와 같이 부드럽습니다.

    ▲ 그림 3-15 RBF 커널 SVM 모델이 학습한 붓꽃 데이터셋의 결정 경계

    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.