파산감지, 스팸메일 감지, 불량품 감지 등 일상생활에서 불균형적인 이항 분류 문제를 다양하게 접할 수 있다. 반응변수의 클래스의 비율이 상당히 불균형한 경우 이항 분류 모형의 예측 성능이 좋지 않다는 점은 이미 잘 알려진 사실이다. 이러한 문제점을 해결하기 위해 그 동안 오버 샘플링, 언더 샘플링, SMOTE와 같은 여러 샘플링 기법이 개발되어 왔다. 본 연구에서는 분류 모형으로 많이 사용되는 기계학습모형으로 로지스틱 회귀모형, Lasso, 랜덤포레스트, 부스팅, 서포트 벡터 머신을 위의 샘플링 기법들과 결합하여 사용했을 때의 예측 성능을 살펴보았다. 실질적인 예측 성능의 개선 여부를 확인하기 위해 네 개의 실제 자료를 분석하였다. 이와 더불어, 샘플링 방법이 사용될 때 주의해야 할 점에 대해서 강조하였다.
파산감지, 스팸메일 감지, 불량품 감지 등 일상생활에서 불균형적인 이항 분류 문제를 다양하게 접할 수 있다. 반응변수의 클래스의 비율이 상당히 불균형한 경우 이항 분류 모형의 예측 성능이 좋지 않다는 점은 이미 잘 알려진 사실이다. 이러한 문제점을 해결하기 위해 그 동안 오버 샘플링, 언더 샘플링, SMOTE와 같은 여러 샘플링 기법이 개발되어 왔다. 본 연구에서는 분류 모형으로 많이 사용되는 기계학습모형으로 로지스틱 회귀모형, Lasso, 랜덤포레스트, 부스팅, 서포트 벡터 머신을 위의 샘플링 기법들과 결합하여 사용했을 때의 예측 성능을 살펴보았다. 실질적인 예측 성능의 개선 여부를 확인하기 위해 네 개의 실제 자료를 분석하였다. 이와 더불어, 샘플링 방법이 사용될 때 주의해야 할 점에 대해서 강조하였다.
Various imbalanced binary classification problems exist such as fraud detection in banking operations, detecting spam mail and predicting defective products. Several sampling methods such as over sampling, under sampling, SMOTE have been developed to overcome the poor prediction performance of binar...
Various imbalanced binary classification problems exist such as fraud detection in banking operations, detecting spam mail and predicting defective products. Several sampling methods such as over sampling, under sampling, SMOTE have been developed to overcome the poor prediction performance of binary classifiers when the proportion of one group is dominant. In order to overcome this problem, several sampling methods such as over-sampling, under-sampling, SMOTE have been developed. In this study, we investigate prediction performance of logistic regression, Lasso, random forest, boosting and support vector machine in combination with the sampling methods for binary imbalanced data. Four real data sets are analyzed to see if there is a substantial improvement in prediction performance. We also emphasize some precautions when the sampling methods are implemented.
Various imbalanced binary classification problems exist such as fraud detection in banking operations, detecting spam mail and predicting defective products. Several sampling methods such as over sampling, under sampling, SMOTE have been developed to overcome the poor prediction performance of binary classifiers when the proportion of one group is dominant. In order to overcome this problem, several sampling methods such as over-sampling, under-sampling, SMOTE have been developed. In this study, we investigate prediction performance of logistic regression, Lasso, random forest, boosting and support vector machine in combination with the sampling methods for binary imbalanced data. Four real data sets are analyzed to see if there is a substantial improvement in prediction performance. We also emphasize some precautions when the sampling methods are implemented.
* AI 자동 식별 결과로 적합하지 않은 문장이 있을 수 있으니, 이용에 유의하시기 바랍니다.
문제 정의
특히 이 과정에서 우리는 기존의 많은 문헌들이 위의 3가지 샘플링 기법을 잘못 적용하는 여러 사례를 살펴볼 수 있었다 (Ren 등, 2015). 따라서, 본 논문에서는 실제 샘플링 방법을 사용할 때 쉽게 실수할 수 있는 부분을 먼저 지적하고, 잘못 적용되었을 때 나타나는 문제점에 대해 논의하고자 한다. 이는 네 개의 실제 이항 자료 분류 문제를 통해서 구체적으로 설명될 것이다.
본 연구에서는 이항 자료 분류 모형으로 많이 사용되는 기계 학습모형인 로지스틱 회귀모형, Lasso, 랜덤 포레스트, 부스팅, 서포트 벡터 머신(support vector machine; SVM)에 위의 3가지 샘플링 기법을 적용하여 분류 성능의 개선 여부를 사례 연구를 통해 살펴보고자 한다. 특히 이 과정에서 우리는 기존의 많은 문헌들이 위의 3가지 샘플링 기법을 잘못 적용하는 여러 사례를 살펴볼 수 있었다 (Ren 등, 2015).
제안 방법
본 논문은 2절에서 불균형한 이항자료를 분석하기 위해 제안된 3가지 샘플링 방법에 대해서 설명한 후, 3절에서 각 샘플링 방법이 사용될 때 주의해야할 점에 대해서 구체적으로 살펴본다. 결론은 4절에서 주어진다.
본 연구에서는 반응변수가 이항 자료이고 두 클래스의 비율이 불균형할 때의 분류 기법과 샘플링 방법의 모형 성능을 비교해 보았다. 오버샘플링과 SMOTE의 경우 교차 검증에서 과적합을 방지하기 위하여 주의할 점을 확인 하였고, seed에 따른 언더샘플링의 AUC의 변동성을 보고해야함을 강조하였다.
불균형한 이항 자료를 분석할 때 가장 널리 사용되는 3가지 샘플링 방법인 오버샘플링, 언더 샘플링, SMOTE를 순서대로 살펴본다.
대상 데이터
설명변수에는 블락의 길이와 넓이, 위치에 관한 블락의 정보로 구성되어 있으며, 클래스 1의 비율은 10% 정도이며 샘플수는 5,471이다. German Credit 데이터는 관측자의 신용정도를 나타낸 자료로서 설명변수의 개수가 590개이다. 반응변수는 Good과 Bad로 신용상태를 나타내고 있으며 설명변수에는 대출정도, 대출목적과 관측자의 신상정보가 포함되어 있다.
본 연구에서는 Autopart, Page-Black, German Credit, Secom의 네가지 실제 데이터를 분석한다. 각 자료를 다운로드 받을 수 있는 웹 주소는 부록 A에 주어져있다.
데이터처리
모형적합에서 오버샘플링, 언더샘플링, SMOTE 모두 학습데이터에서의 1과 0의 비율이 1 : 1이 되도록 설정하였다. 로지스틱 회귀모형은 데이터의 모든 설명변수를 주효과로 사용하여 적합을 하였고 Lasso는 CV를 사용하여 조절모수(tuning paremeter)를 선택하여 변수선택을 하였다. 랜덤 포레스트 모형에서는 트리 수는 500으로 고정하고 데이터별로 붓스트랩 데이터에서 모형을 구축할 때 사용되는 변수의 수를 CV를 통해 설정하였다.
데이터는 먼저 학습 데이터와 평가 데이터를 7 : 3의 비율로 분할하였다. 학습 데이터에서만 샘플링 기법 및 10-폴드 교차검증(cross validation; CV)을 진행하였고 학습이 완료된 모형은 평가 데이터를 활용해 분류의 예측력이 평가되었다. 분류 모형의 예측력을 평가하는 방법은 receiver operating characteristic(ROC) 곡선의 밑의 면적인 area under the curve (AUC)를 이용하였다.
이론/모형
SVM에서는 커널은 선형(linear)커널을 사용하였고 비용(cost) 조절모수는 CV를 통하여 결정하였다. 모형 적합에는 R의 Caret (Kuhn, 2016) 패키지와 gbm (Ridgeway, 2017), randomForest (Liaw와 Wiener, 2002), e1071 (Meyer 등, 2017), glmnet (Friedman 등, 2010) 패키지를 활용하였다.
학습 데이터에서만 샘플링 기법 및 10-폴드 교차검증(cross validation; CV)을 진행하였고 학습이 완료된 모형은 평가 데이터를 활용해 분류의 예측력이 평가되었다. 분류 모형의 예측력을 평가하는 방법은 receiver operating characteristic(ROC) 곡선의 밑의 면적인 area under the curve (AUC)를 이용하였다. AUC값이 1에 가까울수록 모형의 예측력이 우수한 것으로 판단 할 수 있다.
성능/효과
오버샘플링과 SMOTE의 경우 교차 검증에서 과적합을 방지하기 위하여 주의할 점을 확인 하였고, seed에 따른 언더샘플링의 AUC의 변동성을 보고해야함을 강조하였다. 실제 데이터 분석 결과 특정 샘플링 기법을 추천하기는 어려워 보이며, 데이터에 따라 샘플링 기법의 사용이 예측 성능을 개선하지 못하는 경우도 확인 할 수 있었다. 따라서 실제에서는 여러 샘플링 기법을 적용해보고 성능의 우수성이 두드러지는 방법을 데이터에 맞게 사용하는 것이 필요하다.
본 연구에서는 반응변수가 이항 자료이고 두 클래스의 비율이 불균형할 때의 분류 기법과 샘플링 방법의 모형 성능을 비교해 보았다. 오버샘플링과 SMOTE의 경우 교차 검증에서 과적합을 방지하기 위하여 주의할 점을 확인 하였고, seed에 따른 언더샘플링의 AUC의 변동성을 보고해야함을 강조하였다. 실제 데이터 분석 결과 특정 샘플링 기법을 추천하기는 어려워 보이며, 데이터에 따라 샘플링 기법의 사용이 예측 성능을 개선하지 못하는 경우도 확인 할 수 있었다.
후속연구
실제 데이터 분석 결과 특정 샘플링 기법을 추천하기는 어려워 보이며, 데이터에 따라 샘플링 기법의 사용이 예측 성능을 개선하지 못하는 경우도 확인 할 수 있었다. 따라서 실제에서는 여러 샘플링 기법을 적용해보고 성능의 우수성이 두드러지는 방법을 데이터에 맞게 사용하는 것이 필요하다.
참고문헌 (15)
Altini, M. (2015). Dealing with imbalanced data: undersampling, oversampling and proper cross-validation. http://www.marcoaltini.com/blog/dealing-with-imbalanced-data-undersampling-oversampling-and-proper-cross-validation.
Chawla, N. V., Bowyer, K. W., Hall, L. O., and Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique, Journal of Artificial Intelligence research, 16, 321-357.
Dal Pozzolo, A., Caelen, O., Waterschoot, S., and Bontempi, G. (2013). Racing for unbalanced methods selection. In International Conference on Intelligent Data Engineering and Automated Learning, (pp.24-31), Springer, Berlin, Heidelberg.
Friedman, J., Hastie, T., and Tibshirani, R. (2010). Regularization paths for generalized linear models via coordinate descent, Journal of Statistical Software, 33, 1-22.
Galar, M., Fernandez, A., Barrenechea, E., Bustince, H., and Herrera, F. (2012). A review on ensembles for the class imbalance problem: bagging-, boosting-, and hybrid-based approaches, IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), 42, 463-484.
He, H. and Ma, Y (2013). Imbalanced Learning: Foundations, Algorithms, and Applications, Wiley-IEEE Press, New Jersey.
Hulse, J. V., Khoshgoftaar, T. M., and Napolitano, A. (2007). Experimental perspectives on learning from imbalanced data. In Proceedings of the 24th International Conference on Machine Learning, 935-942.
Kuhn, M. (2016). Building predictive models in R using the caret package, Journal of Statistical Software, 28(5).
Liaw, A. and Wiener, M. (2002). Classification and regression by randomForest, R News, 2, 18-22.
Longadge, R. and Dongre, S. (2013). Class imbalance problem in data mining review, arXiv preprint arXiv:1305.1707
Meyer, D., Dimitriadou, E., Hornik, K., Weingessel, A., and Leisch, F. (2017). e1071: Misc Functions of the Department of Statistics, R package version 1.6-8.
Ren, P., Yao, S., Li, J., Valdes-Sosa, P. A., and Kendrick, K. M. (2015). Improved prediction of preterm delivery using empirical mode decomposition analysis of uterine electromyography signals, PLOS ONE, 10, e0132116
※ AI-Helper는 부적절한 답변을 할 수 있습니다.