COMPARISON OF RANDOM FOREST AND XGBOOST ALGORITHMS IN CREDIT CARD FRAUD CLASSIFICATION - Abdullah, Asrul; Khairah, Della Udya; Pangestika, Menur Wahyu (Computer Science and Information Technology, 2025)
Credit card fraud is a serious issue that can cause significant losses for both consumers and financial service providers. Therefore, a reliable and accurate fraud detection system is essential. The research adopts the CRISP-DM methodology, which includes six phases: Business Understanding, Data Understanding, Data Preparation, Modeling, Evaluation, and Deployment. The dataset used was obtained from the Kaggle platform, consisting of 1,048,574 rows and 23 Features, including transaction amount, merchant category, location, and customer attributes. Model evaluation was conducted using a Confusion Matrix with accuracy, precision, recall , and F1-score as performance metrics. The evaluation results indicate that Xgboost outperforms Random Forest, achieving an accuracy of 99.19%, precision of 98.73%, recall of 99.66%, and F1-score of 99.19%. In comparison, Random Forest achieved an accuracy of 97.68%, precision of 97.38%, recall of 98.01%, and F1-score of 97.69%. These results demonstrate that Xgboost is more effective in consistently identifying fraud ulent transactions. Furthermore, this study successfully developed a web-based application using the Streamlit framework, integrating both models interactively to allow users to input data and obtain classification results in real time. Thus, this study has successfully achieved three main objectives: identifying the most suitable algorithm for fraud classification, thoroughly evaluating model performance, and developing an application as a decision support system for credit card fraud detection.