Comparison of Random Forest and XGBoost for Lead Conversion Prediction to Improve Sales Forecasting Accuracy in CRM Systems
Abstract
This study aims to compare the performance of Random Forest and XGBoost algorithms for customer lead scoring classification within a Customer Relationship Management (CRM) system for a CCTV business in Palembang City. The dataset consisted of 500 customer records collected from 2023 to 2025 and classified into three lead-scoring categories: Hot, Warm, and Cold. The research process involved data preprocessing, an 80:20 training–testing split, model development, and performance evaluation using Accuracy, Precision, Recall, and F1-Score. The results showed that Random Forest achieved an Accuracy of 88.00%, Precision of 89.31%, Recall of 88.00%, and F1-Score of 87.68%. In comparison, XGBoost achieved superior performance, with an Accuracy of 90.00%, Precision of 90.48%, Recall of 90.00%, and F1-Score of 89.89%. These results indicate that XGBoost outperformed Random Forest in classifying customer lead scores and was therefore identified as the best-performing model for the dataset. In addition, product prediction analysis indicated that CCTV Outdoor had the highest predicted sales potential for 2026, with 112 predicted occurrences (22.4%). Overall, the findings demonstrate that machine learning can support customer prioritization, product potential analysis, and data-driven sales strategies within CRM systems.