Comparative Analysis of Machine Learning Algorithms and Data Balancing Techniques for Credit Card Fraud Detection
Michael Geraldin Wijaya, Muhammad Faza Pinaringgi, Alfi Yusrotis Zakiyyah, Meiliana Meiliana
Abstract
The rising prevalence of digital transactions in contemporary financial systems has heightened the risk of credit card fraud (CCF), necessitating effective detection techniques. Machine learning (ML) technologies show promise, but dataset imbalance impedes fraud detection accuracy. This study investigates the effectiveness of ensemble learning techniques and data balancing methods for detecting CCF in imbalanced datasets. We compare four ML algorithms—Logistic Regression, Decision Tree, Random Forest, and XGBoost—and evaluate data balancing techniques including SMOTE, ADASYN, Random Oversampling, CNN, NCR, and Random Undersampling, along with hybrid methods like SMOTE with NCR and ADASYN with NCR. Our experiments use a dataset of credit card transactions made by European cardholders, which includes 30 attributes and exhibits severe class imbalance, with fraud events accounting for only 0.172% of total transactions. Applying balancing techniques led to significant improvements: Random Oversampling with XGBoost achieved the highest F1-Score of 92.43%, with Precision of 97.383% and Recall of 88.418%. Random Forest with Random Oversampling followed with an F1-Score of 91.554%, and NCR with Random Forest achieved an F1-Score of 91.508%. These findings highlight the effectiveness of oversampling techniques in enhancing model performance for imbalanced datasets. Precision, Recall, and F1-Score were emphasized, while specificity and sensitivity were not directly used; macro averages ensured balanced evaluation across all classes. This study concludes that combining Random Forest or XGBoost classifiers with oversampling techniques like Random Oversampling or undersampling methods such as NCR provides accurate and unbiased results for detecting CCF in imbalanced datasets, contributing to reliable fraud detection systems for real-world applications.