[필기] SVM_머신러닝 with Python


[필기] SVM_머신러닝 with Python

이번에 사용하려는 데이터도 sklearn에서 제공해주는 Iris 데이터 셋이다. from sklearn.datasets import load_iris iris = load_iris() data = iris.data target = iris.target data = data[target !=0, :2] target = target[target !=0] 데이터를 불러오고 시각화하고 모델을 파악해보기 위해 단순하게 2종류로만 남긴다. from sklearn.model_selection import train_test_split train_data, test_data, train_target, test_target = train_test_split( data, target, train_size=0.9, random_state=2021 ) 훈련데이터와 테스트 데이터로 나눈다. Linear Kernel 해당 모델은 SVC로 사용할 수 있다. from sklearn.svm import SVC l...


#machinlearning #SVM #머신러닝 #파이썬

원문링크 : [필기] SVM_머신러닝 with Python