Comparison of Naïve Bayes and Random Forest Algorithms for Customer Churn Prediction in Telecommunication Services
Abstract
Customer churn refers to the phenomenon of customers discontinuing a service, posing a serious challenge for telecommunication companies because it directly affects revenue and company reputation. This study compares the performance of the Naïve Bayes and Random Forest algorithms in predicting customer churn in telecommunication services and analyzes the effect of feature selection on their performance. The dataset used is the Telco Customer Churn dataset obtained from Kaggle, consisting of 7,043 customer records with 21 attributes. A supervised learning approach was employed, with preprocessing stages including data cleaning, feature selection using the Gain Ratio method, and data splitting into 80% training and 20% testing data. Modeling and evaluation were conducted using Orange Data Mining software. The results show that Random Forest outperformed Naïve Bayes after feature selection, achieving an accuracy of 0.783, precision of 0.773, recall of 0.783, and F1-score of 0.776, while Naïve Bayes achieved an accuracy of 0.747, precision of 0.801, recall of 0.747, and F1-score of 0.760. Feature selection improved Naïve Bayes performance while slightly reducing Random Forest performance. The Contract, OnlineSecurity, and TechSupport attributes were identified as the most influential features for predicting customer churn.