Segmentasi Pelanggan dan Prediksi Churn E-Commerce Menggunakan K-Means Clustering dan Random Forest: Studi Kasus Olist Brazil

Authors

Keywords:

customer segmentation, churn prediction, K-Means Clustering, Random Forest, RFM, e-commerce, CRISP-DM

Abstract

Among 93,357 customers analyzed from the Olist Brazil e-commerce platform, nearly four in ten were found to be in a state of permanent churn a condition invisible to conventional transaction reporting without data-driven segmentation. This study proposes a two-stage analytical pipeline integrating RFM-based (Recency, Frequency, Monetary) K-Means Clustering with a Random Forest Classifier for churn prediction, structured within the CRISP-DM framework. Data were drawn from the Olist Brazilian E-Commerce Public Dataset covering 115,653 orders between 2016 and 2018. Churn was operationalized as customers with recency exceeding 180 days and a transaction frequency of one, yielding a churn proportion of 56.4% across the sample. Clustering at K=4 (Silhouette Score=0.526) partitioned customers into four behaviorally distinct segments: Active (53%, churn rate 29%), Lost (39%, churn rate 100%), Big Spender (4%, churn rate 60%), and Loyal (3%, churn rate 0%). Cluster labels were subsequently incorporated as input features into the Random Forest model a design decision that proved consequential, as the cluster variable emerged as the single strongest predictor with a feature importance score of 0.826, outweighing all individual behavioral features combined. The model achieved an ROC-AUC of 0.897, accuracy of 82.9%, precision of 97.7%, recall of 71.5%, and F1-Score of 82.6%. These results demonstrate that customer segmentation, when embedded within a predictive pipeline rather than used in isolation, yields substantial gains in churn detection capability.

References

[1] Statista. (2023). E-commerce revenue in Brazil from 2017 to 2027. Statista Digital Market Outlook. https://www.statista.com/forecasts/1151564/e-commerce-revenue-brazil

[2] Dursun, A., & Caber, M. (2022). Using data mining techniques for profiling profitable hotel customers: An application of RFM analysis. Tourism Management Perspectives, 41, 100922. https://doi.org/10.1016/j.tmp.2021.100922

[3] Kasiran, M. F., Nordin, N. A., & Othman, M. F. (2022). Customer churn prediction using machine learning: A systematic review. Journal of Physics: Conference Series, 2319(1), 012006. https://doi.org/10.1088/1742-6596/2319/1/012006

[4] Karimah, M., & Marwati, F. (2024). Sustainability of quality management by implementing data mining to predict academic achievement. Journal of Social Science and Business Studies, 2(3), 240–250. https://doi.org/10.61487/jssbs.v2i3.90

[5] Prayitno, A., & Riastuti, R. (2023). Customer segmentation using RFM analysis and K-Means clustering on e-commerce transaction data. Jurnal Ilmu Komputer dan Informasi, 16(1), 45–54. https://doi.org/10.21609/jiki.v16i1.1124

[6] Arifin, T., Wahyudi, M., & Sulistyo, S. (2023). Comparative analysis of machine learning algorithms for customer churn prediction in e-commerce. Journal of Theoretical and Applied Information Technology, 101(8), 3012–3024. http://www.jatit.org/volumes/Vol101No8/1Vol101No8.pdf

[7] Olist. (2018). Brazilian E-Commerce Public Dataset by Olist [Data set]. Kaggle. https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce

[8] Schröer, C., Kruse, F., & Gómez, J. M. (2021). A systematic literature review on applying CRISP-DM process model. Procedia Computer Science, 181, 526–534. https://doi.org/10.1016/j.procs.2021.01.199

[9] Syakur, M. A., Khotimah, B. K., Rochman, E. M. S., & Satoto, B. D. (2022). Integration K-Means clustering method and elbow method for identification of the best customer profile cluster. IOP Conference Series: Materials Science and Engineering, 336(1), 012017. https://doi.org/10.1088/1757-899X/336/1/012017

[10] Tarawneh, A. S., Hassanat, A. B., Altarawneh, G. A., & Almuhaimeed, A. (2022). Stop oversampling for class imbalance learning: A review. IEEE Access, 10, 47643–47660. https://doi.org/10.1109/ACCESS.2022.3169512

[11] Vafeiadis, T., Diamantaras, K. I., Sarigiannidis, G., & Chatzisavvas, K. C. (2022). A comparison of machine learning techniques for customer churn prediction. Simulation Modelling Practice and Theory, 76, 226–242. https://doi.org/10.1016/j.simpat.2021.102517

[12] Alkhayrat, M., Aljnidi, M., & Aljoumaa, K. (2020). A comparative dimensionality reduction study in telecom customer segmentation using deep learning and PCA. Journal of Big Data, 7(1), 9. https://doi.org/10.1186/s40537-020-00290-0

Published

2026-06-23

How to Cite

Airennn, M. Y., Nazra Suhendra, D., & Rena Amanda, N. (2026). Segmentasi Pelanggan dan Prediksi Churn E-Commerce Menggunakan K-Means Clustering dan Random Forest: Studi Kasus Olist Brazil. Journal of Information Systems and Business Technology, 2(3), 918-926. https://journal.jci.co.id/jisbt/article/view/542

Most read articles by the same author(s)