#임포트코드 import pandas as pd import numpy as np import matplotlib.pyplot as plt import mglearn from imblearn.under_sampling import RandomUnderSampler from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.svm import SVC from sklearn.metrics import accuracy_score, confusion_matrix, classification_report ''' #breast_cancer_data ''' 1) 주어진 데이터를 로드해서 X / Y 를 나누고 2) 언더샘플링 하여 1:1을 맞추고 3) train_test_split를 통해 8:2, 랜덤 10으로 나눈 후 (결과비는 고정으로) 4) StandardScaler를 통해 표준화 하고 데이터 분포를 boxplot으로 확인 5) C값(0.001 ~ 1000)과 gamma값(0.0001 ~ 0.1)의 조합을 이중 for문으로 반복 학습하여 최적의 C와 감마, 정확도를 찾고 6) 각 조합에 따른 최종 예측 스코어를 찾고 7) Confusion matrix 로 표시하세요 '''
댓글 (0)