Predictive Analytics of Consumer Buying Behavior using Machine Learning Algorithms: A Case Study of Sue's Beads Handmade Jewelry Shop

Authors

  • Chittimarat Buckley Program of Digital Technology, School of Science and Technology Sukhothai Thammathirat Open University
  • Nithizethe Mhuadthongon Program of Digital Technology, School of Science and Technology Sukhothai Thammathirat Open University

Abstract

This study aims to 1) develop predictive models for customer purchasing behavior, 2) evaluate the performance of the developed models, and 3) apply the most effective model to a real business case of Sue’s Beads Handmade Jewelry. Three algorithms were employed, namely Decision Tree (DT), Gradient Boosted Tree (GBT), and Logistic Regression (LR), in combination with RFM (Recency, Frequency, Monetary) analysis. The dataset consisted of purchase records of 500 customers collected between January 2023 and December 2024. Data were split chronologically using a time-based hold-out method, with 80% used for training and 20% for testing, to prevent data leakage and reflect real-world predictive conditions. The results show that Logistic Regression achieved the highest performance with 100% accuracy across all evaluation metrics, whereas Decision Tree and Gradient Boosted Tree achieved equal accuracy of 95.40%. The RFM score was identified as the most influential predictor of customer purchasing behavior, with an average importance weight of 19%. Customer segmentation revealed that 458 customers (91.60%) were likely to make repeat purchases, whereas 42 customers (8.40%) were unlikely to return to the store. The average ROC-AUC value exceeded 0.95. Considering the imbalanced nature of the dataset (91.6% repeat customers), additional evaluation metrics, namely Precision–Recall AUC (PR-AUC) and Recall, were applied to provide a more balanced and fair assessment of model performance. These findings indicate that integrating RFM analysis with machine learning algorithms provides a reliable and practical tool for analyzing and managing customer behavior. For small businesses, particularly in the handicraft sector, such predictive models can be applied to support marketing strategy development and customer retention.

References

เอกสิทธิ์ พัชรวงศ์ศักดา. (2566). วิทยาศาสตร์ข้อมูล (Data Science). นนทบุรี:สำนักพิมพ์บริษัท ไอดีซี พรีเมียร์ จำกัด.

Altair Engineering Inc. (2024). RapidMiner Studio system requirements and performance guidelines (Version 2024.1.0) [Technical documentation]. Retrieved from https://docs.rapidminer.com

Alghamdi, N. S., Prawira, N., Wella, W., and Natalia, F. (2024). Exploring the role of machine learning and big data analytics in business decision-making. JOIV: International Journal on Informatics Visualization, 8(4), 2314-2326. doi: 10.62577/joiv.v8i4.3244

Ashokan, G. (2023). Retail sales analysis and forecast using machine learning [Computer software]GitHub. Retrieved from https://github.com/gopiashokan/Retail-Sales-Analysis-and-Forecast-using-Machine-Learning[web:100]

Azad, M. S., Khan, S. S., Hossain, R., Rahman, R., and Momen, S. (2023). Predictive modeling of consumer purchase behavior on social media: Integrating theory of planned behavior and machine learning for actionable insights. PLoS ONE, 18(12), Article e0296336. doi: 10.1371/journal.pone.0296336

Baisani, A., Laohakiat, S., and Laohakiat, S. (2021). The study of customer segmentation by using RFM model and text analytics (Master’s thesis, Srinakharinwirot University). Retrieved from http://ir-ithesis.swu.ac.th/dspace/handle/123456789/108

Brüggemann, P., Martinez, L. F., and Martínez-López, F. J. (2025). The future of analytics in digital marketing and electronic commerce: How digitalization and sustainability affect consumers, firms, and policymakers. Journal of Marketing Analytics, 13, 571–573. doi: 10.1057/s41270-025-00422-6

Cerqueira, V., Torgo, L., and Mozetič, I. (2020). Evaluating time series forecasting models: An empirical study on rolling origin evaluation. Information Sciences, 512, 383–402. doi: 10.1016/j.ins.2019.10.034

Chen, D., Sain, S. L., and Guo, K. (2012). Data mining for the online retail industry: A case study of RFM model- based customer segmentation using data mining techniques. Journal of Database Marketing & Customer Strategy Management, 19(3), 197-208. doi: 10.1057/dbm.2012.17

Chuang, C. H., Wong, K. I., Kao, R. S., and Chang, C. J. (2017). Customer behavior analysis using RFM model and clustering techniques. Applied Sciences, 7(12), 1243. doi: 10.3390/app7121243

Efron, B., and Tibshirani, R. J. (1994). An introduction to the bootstrap. New York, NY: Chapman & Hall/CRC. Retrieved from https://doi.org/10.1201/9780429246593

Fader, P. S., and Hardie, B. G. S. (2013). RFM and CLV: Using behavioral data to manage customers for profit. SSRN Electronic Journal. Retrieved from https://doi:10.2139/ssrn.2324336

Hanley, J. A., and McNeil, B. J. (1982). The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143(1), 29–36. doi: 10.1148/radiology.143.1.7063747

He, H., and Garcia, E. (2009). Learning from imbalanced data. IEEE Transactions on Knowledge and Data Engineering, 21(9), 1263–1284. doi: 10.1109/TKDE.2008.239

Ho, T., Nguyen, S., Nguyen, H., Nguyen, N., Man, D-S., and Le, T-G. (2023). An extended RFM model for customer behaviour and demographic analysis in retail industry. Business Systems Research, 14(1), 45-67. doi: 10.2478/bsrj-2023-0004

Hosseini, S. M. S., Maleki, A., and Gholamian, M. R. (2010). Cluster analysis using data mining approach to develop CRM methodology to assess the customer loyalty. Expert Systems with Applications, 37(7), 5259-5264. doi: 10.1016/j.eswa.2009.12.070

Kapoor, S., and Narayanan, A. (2023). Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9), 100804. doi: 10.1016/j.patter.2023.100804

Kohavi, R. (1995). A study of cross-validation and bootstrap for accuracy estimation and model selection. In Proceedings of the 14th International Joint Conference on Artificial Intelligence (Vol. 2, pp. 1137–1145). Montreal, Canada: Morgan Kaufmann.

Munde, S., and Kaur, H. (2024). Predictive analytics in business: Current trends and future directions. Business Intelligence Journal, 15(1), 45-62.

Niculescu-Mizil, A., and Caruana, R. (2005). Predicting good probabilities with supervised learning. In Proceedings of the 22nd International Conference on Machine Learning (pp. 625–632). New York, NY: ACM Press.

Rahim, M. A. (2021). RFM-based repurchase behavior for customer classification and segmentation. Journal of Retailing and Consumer Services, 61, 102574. doi: 10.1016/j.jretconser.2021.102574

Ullah, A., Mohmand, M. I., Hussain, H., Johar, S., Khan, I., Ahmad, S., and Huda, S. (2023). Customer analysis using machine learning-based classification algorithms for effective segmentation using recency, frequency, monetary, and time. Sensors, 23(6), 3180. doi: 10.3390/s23063180

Wong, C.-G., Tong, G.-K., and Haw, S.-C. (2024). Exploring customer segmentation in e-commerce using RFM analysis with clustering techniques. Journal of Telecommunications and the Digital Economy, 12(3), 97–125. doi: 10.18080/jtde.v12n3.978

Downloads

Published

2026-06-15