Enhanced Detection of Consumer Behavioral Shifts in E-Commerce Platforms with Transformer-Based Algorithms
Abstract
This research aims to analyze changes in consumer behavior on e-commerce platforms using consumer interaction data such as view, add to cart, and purchase. Identifying changes in consumer behavior on e-commerce platforms is very important because it can provide deeper insight into consumer motivations and preferences. By better understanding how consumers interact with products, companies can design more targeted strategies to increase conversions, reduce cart abandonment, and improve the overall customer experience. The DistilBERT based prediction model is applied to detect and predict changing patterns of consumer behavior in the purchasing process. DistilBERT was chosen because of its more efficient capabilities compared to previous models which enable faster data processing and lower resource usage, which is very important for real-time applications on e-commerce platforms with big data. The data used includes consumer interactions during a certain period, with model evaluation using precision, recall, F1-score, and accuracy metrics. The results showed that despite an increase in the number of actions such as View and Add to Cart, conversion to Purchase was still hampered, indicating a cart abandonment problem. The model used managed to achieve 90% accuracy, with a precision value of 0.87, recall of 0.85, and F1-score of 0.86, showing excellent performance in predicting changes in consumer behavior. Based on the results of this analysis, companies can optimize marketing strategies by targeting consumers who have added products to their basket but have not yet made a purchase, as well as making price adjustments, discounts, and limited time offers. This research also emphasizes the importance of using real-time data to dynamically adjust marketing strategies and improve customer experience.
Keywords
Full Text:
PDFReferences
L. Xia, S. Baghaie, and S. Mohammad Sajadi, “The digital economy: Challenges and opportunities in the new era of technology and electronic communications,” Ain Shams Engineering Journal, vol. 15, no. 2, p. 102411, Feb. 2024, doi: 10.1016/j.asej.2023.102411.
J. Costa and R. Castro, “SMEs Must Go Online—E-Commerce as an Escape Hatch for Resilience and Survivability,” Journal of Theoretical and Applied Electronic Commerce Research, vol. 16, no. 7, pp. 3043–3062, Nov. 2021, doi: 10.3390/jtaer16070166.
A. A. Ahi, N. Sinkovics, and R. R. Sinkovics, “E-commerce Policy and the Global Economy: A Path to More Inclusive Development?,” Management International Review, vol. 63, no. 1, pp. 27–56, Feb. 2023, doi: 10.1007/s11575-022-00490-1.
L. Theodorakopoulos and A. Theodoropoulou, “Leveraging Big Data Analytics for Understanding Consumer Behavior in Digital Marketing: A Systematic Review,” Hum Behav Emerg Technol, vol. 2024, no. 1, Jan. 2024, doi: 10.1155/2024/3641502.
A. Rosário and R. Raimundo, “Consumer Marketing Strategy and E-Commerce in the Last Decade: A Literature Review,” Journal of Theoretical and Applied Electronic Commerce Research, vol. 16, no. 7, pp. 3003–3024, Nov. 2021, doi: 10.3390/jtaer16070164.
T. Chen, W. Guo, X. Gao, and Z. Liang, “AI-based self-service technology in public service delivery: User experience and influencing factors,” Gov Inf Q, vol. 38, no. 4, p. 101520, Oct. 2021, doi: 10.1016/j.giq.2020.101520.
A. Haleem, M. Javaid, M. Asim Qadri, R. Pratap Singh, and R. Suman, “Artificial intelligence (AI) applications for marketing: A literature-based study,” International Journal of Intelligent Networks, vol. 3, pp. 119–132, 2022, doi: 10.1016/j.ijin.2022.08.005.
S.-C. Huang, A. D. K. Silalahi, I. J. Eunike, and D. Riantama, “Understanding impulse buying in E-commerce: The Big Five traits perspective and moderating effect of time pressure and emotions,” Telematics and Informatics Reports, vol. 15, p. 100157, Sep. 2024, doi: 10.1016/j.teler.2024.100157.
G. A. Ogunmola and V. Kumar, “A strategic model for attracting and retaining environmentally conscious customers in E-retail,” International Journal of Information Management Data Insights, vol. 4, no. 2, p. 100274, Nov. 2024, doi: 10.1016/j.jjimei.2024.100274.
H. Zhang and M. O. Shafiq, “Survey of transformers and towards ensemble learning using transformers for natural language processing,” J Big Data, vol. 11, no. 1, p. 25, Feb. 2024, doi: 10.1186/s40537-023-00842-0.
K. Nassiri and M. Akhloufi, “Transformer models used for text-based question answering systems,” Applied Intelligence, vol. 53, no. 9, pp. 10602–10635, May 2023, doi: 10.1007/s10489-022-04052-8.
H. Bashiri and H. Naderi, “Comprehensive review and comparative analysis of transformer models in sentiment analysis,” Knowl Inf Syst, vol. 66, no. 12, pp. 7305–7361, Dec. 2024, doi: 10.1007/s10115-024-02214-3.
H. J. Alantari, I. S. Currim, Y. Deng, and S. Singh, “An empirical comparison of machine learning methods for text-based sentiment analysis of online consumer reviews,” International Journal of Research in Marketing, vol. 39, no. 1, pp. 1–19, Mar. 2022, doi: 10.1016/j.ijresmar.2021.10.011.
K. R. Narejo et al., “EEBERT: An Emoji-Enhanced BERT Fine-Tuning on Amazon Product Reviews for Text Sentiment Classification,” IEEE Access, vol. 12, pp. 131954–131967, 2024, doi: 10.1109/ACCESS.2024.3456039.
P. Beránek and V. Merunka, “Analyzing Customer Sentiments: A Comparative Evaluation of Large Language Models for Enhanced Business Intelligence,” 2024, pp. 229–240. doi: 10.1007/978-3-031-61003-5_20.
C.-J. Liu, T.-S. Huang, P.-T. Ho, J.-C. Huang, and C.-T. Hsieh, “Machine learning-based e-commerce platform repurchase customer prediction model,” PLoS One, vol. 15, no. 12, p. e0243105, Dec. 2020, doi: 10.1371/journal.pone.0243105.
I. Karabila, N. Darraz, A. EL-Ansari, N. Alami, and M. EL Mallahi, “BERT-enhanced sentiment analysis for personalized e-commerce recommendations,” Multimed Tools Appl, vol. 83, no. 19, pp. 56463–56488, Dec. 2023, doi: 10.1007/s11042-023-17689-5.
L. Gomes, R. da Silva Torres, and M. L. Côrtes, “BERT- and TF-IDF-based feature extraction for long-lived bug prediction in FLOSS: A comparative study,” Inf Softw Technol, vol. 160, p. 107217, Aug. 2023, doi: 10.1016/j.infsof.2023.107217.
V. Dogra, A. Singh, S. Verma, Kavita, N. Z. Jhanjhi, and M. N. Talib, “Analyzing DistilBERT for Sentiment Classification of Banking Financial News,” 2021, pp. 501–510. doi: 10.1007/978-981-16-3153-5_53.
D. Cortiz, “Exploring Transformers models for Emotion Recognition: a comparision of BERT, DistilBERT, RoBERTa, XLNET and ELECTRA,” in 2022 3rd International Conference on Control, Robotics and Intelligent System, New York, NY, USA: ACM, Aug. 2022, pp. 230–234. doi: 10.1145/3562007.3562051.
A. Areshey and H. Mathkour, “Exploring transformer models for sentiment classification: A comparison of BERT, RoBERTa , ALBERT, DistilBERT, and XLNet,” Expert Syst, vol. 41, no. 11, Nov. 2024, doi: 10.1111/exsy.13701.
A. Alshanqiti, A. Namoun, A. Alsughayyir, A. M. Mashraqi, A. R. Gilal, and S. S. Albouq, “Leveraging DistilBERT for Summarizing Arabic Text: An Extractive Dual-Stage Approach,” IEEE Access, vol. 9, pp. 135594–135607, 2021, doi: 10.1109/ACCESS.2021.3113256.
D. Oralbekova, O. Mamyrbayev, M. Othman, D. Kassymova, and K. Mukhsina, “Contemporary Approaches in Evolving Language Models,” Applied Sciences, vol. 13, no. 23, p. 12901, Dec. 2023, doi: 10.3390/app132312901.
A. Sbei, K. ElBedoui, and W. Barhoumi, “Synergistic Text Annotation Based on Rule-Based Expressions and DistilBERT,” 2024, pp. 408–422. doi: 10.1007/978-981-97-4985-0_32.
M. B. Gulfraz, M. Sufyan, M. Mustak, J. Salminen, and D. K. Srivastava, “Understanding the impact of online customers’ shopping experience on online impulsive buying: A study on two leading E-commerce platforms,” Journal of Retailing and Consumer Services, vol. 68, p. 103000, Sep. 2022, doi: 10.1016/j.jretconser.2022.103000.
C.-Y. Shin, J.-T. Park, U.-J. Baek, and M.-S. Kim, “A Feasible and Explainable Network Traffic Classifier Utilizing DistilBERT,” IEEE Access, vol. 11, pp. 70216–70237, 2023, doi: 10.1109/ACCESS.2023.3293105.
A. Bahaa, A. E.-R. Kamal, H. Fahmy, and A. S. Ghoneim, “DB-CBIL: A DistilBert-Based Transformer Hybrid Model Using CNN and BiLSTM for Software Vulnerability Detection,” IEEE Access, vol. 12, pp. 64446–64460, 2024, doi: 10.1109/ACCESS.2024.3396410.
S. Shah, S. Lucia Manzoni, F. Zaman, F. Es Sabery, F. Epifania, and I. Francesco Zoppis, “Fine-Tuning of Distil-BERT for Continual Learning in Text Classification: An Experimental Analysis,” IEEE Access, vol. 12, pp. 104964–104982, 2024, doi: 10.1109/ACCESS.2024.3435537.
N. Mylonas, I. Mollas, and G. Tsoumakas, “An attention matrix for every decision: faithfulness-based arbitration among multiple attention-based interpretations of transformers in text classification,” Data Min Knowl Discov, vol. 38, no. 1, pp. 128–153, Jan. 2024, doi: 10.1007/s10618-023-00962-4.
J. Miao and W. Zhu, “Precision–recall curve (PRC) classification trees,” Evol Intell, vol. 15, no. 3, pp. 1545–1569, Sep. 2022, doi: 10.1007/s12065-021-00565-2.
A. E. Maxwell, T. A. Warner, and L. A. Guillén, “Accuracy Assessment in Convolutional Neural Network-Based Deep Learning Remote Sensing Studies—Part 1: Literature Review,” Remote Sens (Basel), vol. 13, no. 13, p. 2450, Jun. 2021, doi: 10.3390/rs13132450.
A. Tharwat, “Classification assessment methods,” Applied Computing and Informatics, vol. 17, no. 1, pp. 168–192, Jan. 2021, doi: 10.1016/j.aci.2018.08.003.
G. Naidu, T. Zuva, and E. M. Sibanda, “A Review of Evaluation Metrics in Machine Learning Algorithms,” 2023, pp. 15–25. doi: 10.1007/978-3-031-35314-7_2.
K. Takahashi, K. Yamamoto, A. Kuchiba, and T. Koyama, “Confidence interval for micro-averaged F1 and macro-averaged F1 scores,” Applied Intelligence, vol. 52, no. 5, pp. 4961–4972, Mar. 2022, doi: 10.1007/s10489-021-02635-5.
M. Heydarian, T. E. Doyle, and R. Samavi, “MLCM: Multi-Label Confusion Matrix,” IEEE Access, vol. 10, pp. 19083–19095, 2022, doi: 10.1109/ACCESS.2022.3151048.
M.-T. Wu, “Confusion matrix and minimum cross-entropy metrics based motion recognition system in the classroom,” Sci Rep, vol. 12, no. 1, p. 3095, Feb. 2022, doi: 10.1038/s41598-022-07137-z.
Y. Nohara, K. Matsumoto, H. Soejima, and N. Nakashima, “Explanation of machine learning models using shapley additive explanation and application for real data in hospital,” Comput Methods Programs Biomed, vol. 214, p. 106584, Feb. 2022, doi: 10.1016/j.cmpb.2021.106584.
I. U. Ekanayake, D. P. P. Meddage, and U. Rathnayake, “A novel approach to explain the black-box nature of machine learning in compressive strength predictions of concrete using Shapley additive explanations (SHAP),” Case Studies in Construction Materials, vol. 16, p. e01059, Jun. 2022, doi: 10.1016/j.cscm.2022.e01059.
N. Nordin, Z. Zainol, M. H. Mohd Noor, and L. F. Chan, “An explainable predictive model for suicide attempt risk using an ensemble learning and Shapley Additive Explanations (SHAP) approach,” Asian J Psychiatr, vol. 79, p. 103316, Jan. 2023, doi: 10.1016/j.ajp.2022.103316.
L. Antwarg, R. M. Miller, B. Shapira, and L. Rokach, “Explaining anomalies detected by autoencoders using Shapley Additive Explanations,” Expert Syst Appl, vol. 186, p. 115736, Dec. 2021, doi: 10.1016/j.eswa.2021.115736.
DOI: https://doi.org/10.47738/jads.v6i4.907
Refbacks
- There are currently no refbacks.

Journal of Applied Data Sciences
| ISSN | : | 2723-6471 (Online) |
| Publisher | : | Bright Publisher |
| Website | : | http://bright-journal.org/JADS |
| : | taqwa@amikompurwokerto.ac.id (principal contact) | |
| support@bright-journal.org (technical issues) |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0




.png)