728x90
1. 하이퍼파라미터 튜닝
from sklearn.model_selection import GridSearchCV / RandomizedSearchCV
param = {'C': [...]}
search = GridSearchCV(model, param, cv=5) / RandomizedSearch(model, param, cv=5)
search.fit(X_train, y_train)
search.best_params_
search.best_score_
2. 결과 해석
from sklearn.metrics import roc_auc_score
roc = roc_auc_score(y, pred)
from sklearn.metrics import confusion_matrix
confusion = confusion_matrix(y, pred)
from sklearn.metrics import classification_report
report = classification_report(y, pred)
from sklearn.matrics import accuracy_score
accuracy = accuracy_score(y, pred)
from sklearn.matrics import mean_squared_error / mean_absolute_error
mean_error = mean_squared_error(y, pred)
= mean_absolute_error(y, pred)
728x90
'IT자격증 > 빅데이터분석기사(실기)' 카테고리의 다른 글
[빅데이터분석기사 실기] 제2유형 (0) | 2022.06.15 |
---|---|
[빅데이터분석기사 실기] 제1유형 (0) | 2022.06.15 |
[빅데이터분석기사 실기] 결과 저장 (0) | 2022.05.30 |
[빅데이터분석기사 실기] 모델 학습 및 검증 (0) | 2022.05.30 |
[빅데이터분석기사 실기] 데이터 분석 및 전처리 (0) | 2022.05.30 |