본문 바로가기

Machine Learning

(47)
Model Tuning - Stacking : 실전 적용 https://steadiness-193.tistory.com/294 Model Tuning - Stacking (스태킹_CV 기반) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML b.. steadiness-193.tistory.com 위 포스팅에선 train_test_split을 이용해서 라벨 후처리와 점수 측정까지 동시에 해보았다. 그러나 실제 대회에선 저렇게 나누지 않고 진행한다. 이번에도 익숙한 ..
Model Tuning - Stacking (스태킹_CV 기반) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 전처리 완료한 데이터를 이용하되, 위 포스팅에선 일부 행을 삭제했지만 지금은 그대로 다 이용한다. 임시로 정답지가 있는 tmp_x_test와 tmp_y_test 데이터셋을 분리하고 StratifiedKFold를 불러두..
Model Tuning - Label Postprocessing : 실전 적용 https://steadiness-193.tistory.com/291 Validation - Label Postprocessing (라벨 후처리) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML b.. steadiness-193.tistory.com 위 포스팅에선 train_test_split을 이용해서 라벨 후처리와 점수 측정까지 동시에 해보았다. 그러나 실제 대회에선 저렇게 나누지 않고 진행한다. 라벨..
Model Tuning - Label Postprocessing (라벨 후처리) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 전처리 완료한 데이터를 이용하되, 위 포스팅에선 일부 행을 삭제했지만 지금은 그대로 다 이용한다. 임시로 정답지가 있는 tmp_x_test와 tmp_y_test 데이터셋을 분리해두자 점수 측정은 f1 score를 이용..
Validation - OOF Ensemble (Out-of-Fold) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 만든 데이터셋과 함수를 이용한다. 필요 라이브러리 호출 및 데이터셋 설정 임시로 정답지가 있는 데이터 셋을 train_test_split으로 나눠놓자 Cross validation / OOF validation 간단히..
Validation - Voting Ensemble (VotingClassifier) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 만든 데이터셋과 함수를 이용한다. 필요 라이브러리 호출 및 데이터셋 설정 우선 Voting Ensemble을 하기 전에 그리드 서치를 통해 각 모델별로 최적의 파라미터를 설정한 best estimator를 가져온다. ..
Validation - GridSearchCV https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 만든 데이터셋을 이용한다. Grid Search 클래스 객체에 fit 메서드를 호출하면 grid search를 사용하여 자동으로 복수개의 내부 모형을 생성하고 이를 모두 실행시켜서 최적 파라미터를 찾아준다. 파라미터를..
Validation - StratifiedKFold (Cross Validation) https://steadiness-193.tistory.com/286 Validation - KFold www.kaggle.com/c/titanic/data Titanic: Machine Learning from Disaster Start here! Predict survival on the Titanic and get familiar with ML basics www.kaggle.com 캐글의 타이타닉으로 연습한다. 전처리.. steadiness-193.tistory.com 위 포스팅에서 만든 데이터셋을 이용하며 class imbalance 상황에서 썼던 KFold의 단점을 보완하는 방법을 알아보자. Stratify KFold 분류할 클래스의 비율이 다르다면 이를 반영해서 k개의 fold를 해야한다. ..