Predicting the products needed by e-commerce customers using machine learning algorithms in Kalleh Meat Products Company

Document Type : Original Article (Mixed)

Authors

1 Master of Business Administration graduate, Faculty of Humanities and Social Sciences, Shomal University, Amol, Iran

2 Associate Professor,Department of Management, Faculty of Humanities and Social Sciences, University of Shomal, Amol, Iran

3 Associate Professor,Department of Management, Faculty of Humanities and Social Sciences, Shomal University, Amol, Iran

4 Assistant Professor, Department of Management, Faculty of Humanities and Social Sciences, Shomal University, Amol, Iran

5 Department of Accounting, Faculty of Management and Accounting, College of Farabi, University of Tehran, Qom, Iran

Abstract
Abstract
This research aimed to predict the products required by e-commerce customers in Kaleh Meat Products Company using machine learning algorithms. The present research was conducted with an applicable and quantitative approach in terms of purpose. The data used included historical information on online purchases of Kaleh Company customers, which included the variables "product price", "past weight purchase volume", "product type", "past purchase frequency" and "past Rial purchase amount". To predict the "required product" as an output variable, four machine learning algorithms including artificial neural network, random forest, decision tree and K-nearest neighbor were implemented and evaluated with the criteria of Accuracy, Precision, Recall and F1-Score. The results of the model evaluation showed that the artificial neural network algorithm achieved the highest score in all evaluation criteria (Precision: 95.1%, Accuracy: 94.2%, Recall: 95.9% and F1-Score: 95.5%). The results showed that the artificial neural network has the best performance in predicting the products needed by customers; the research models were implemented and validated in the Python version 3.x programming environment and using the specialized libraries Scikit-learn and Keras based on TensorFlow. After that, the random forest, decision tree and K-nearest neighbor algorithms were used, respectively. Also, the analysis of the importance of the variables showed that "past weighted purchase volume" and "past purchase frequency" had the greatest impact on the model's prediction. The proposed model based on the artificial neural network has the ability to become an accurate and efficient product recommendation system for the Kale company. Implementing this model can lead to optimized inventory management, increased customer satisfaction, and ultimately sales growth by accurately predicting future customer demand.
Introduction
Accurately predicting customer purchasing behavior is recognized as one of the most central capabilities of market-oriented organizations in the era of digital transformation, because in order to achieve sustainable competitive advantage, companies must predict future customer needs and allocate their resources to the production and distribution of products that are most likely to be purchased; otherwise, they will face phenomena such as accumulation of low-demand inventories, increased holding costs, lost sales opportunities, and ultimately reduced profitability (Bhavishya et al., 2025). This challenge is even more critical in industries with perishable and time-sensitive products such as meat products, because any forecast error not only leads to direct financial losses, but also to damage to brand reputation and reduced customer trust (Satyanarayana et al., 2025; Jauhar et al., 2025). With the rapid expansion of e-commerce and the development of digital infrastructure, a huge amount of transactional big data including purchase records, order frequency, product type, prices, and purchase time has been generated, which has provided a suitable platform for the application of advanced data analysis methods (Wen & Liu, 2026; Jain, 2025). In the meantime, machine learning algorithms are known as powerful analytical tools in the field of demand forecasting and recommender systems due to their ability to identify hidden patterns and nonlinear relationships (Syamsuri et al., 2025). Despite the large volume of transaction data in the e-commerce system of Kale Meat Products Company, no data-driven model has been designed to predict the products needed by customers, and managers often face shortages of high-demand products or overproduction of low-demand products. Therefore, the main objective of this study is to design and evaluate a model based on machine learning algorithms to predict the products needed by customers in the e-commerce platform of Kale Company and to identify the best algorithm in terms of accuracy, precision, recall, and F1 score.
Theoretical Framework
The theoretical foundations of this study are based on the intersection of e-commerce, consumer behavior, and machine learning. Machine learning enables the extraction of complex patterns from large data and data-driven decision-making (Breiman, 2001). Algorithms such as support vector machines are used in the analysis of customer behavioral data due to their ability to model nonlinear relationships (Cortes & Vapnik, 1995).
Customer Buying Behavior in E-Commerce (Digital RFM Model)
E-commerce platforms are a huge source of customer behavioral data (Kechri et al., 2025). Past purchasing patterns are considered the strongest predictor of future behavior (Li & Hu, 2026). The RFM model analyzes customer behavior based on purchase recency, purchase frequency, and transaction value (Gupta & Agarwal, 2024). In this study, past purchase frequency and past purchase amount are adapted from this theoretical structure. Customers with higher purchase frequency have stronger behavioral attachment to the brand (Fang et al., 2025). The financial volume of transactions reflects the customer lifetime value (Akter et al., 2025). Combining these variables allows for dynamic personalization (Vuppala & Prasad, 2026).
Supply Chain: Demand Forecasting in Perishable Food Industries
Meat products face logistical challenges due to their high perishability (Jauhar et al., 2025). Maintaining a safe inventory is costly due to the risk of expiration (Padmanabhan et al., 2025). The imbalance between supply and demand creates the bullwhip effect (Letto & Orsini, 2025). Predictive logistics emphasizes the shift from push to pull mode based on actual demand (Thiel et al., 2023). In this study, past weighted purchase volume and product type are entered into the model as supply chain indicators.
Analytical Tools: Recommender Systems and Python Computing Platform Recommender systems play a key role in guiding customer choices (Koren et al., 2009). The entire data pipeline is developed in Python. Artificial neural networks extract hidden patterns of transactions (Hochreiter & Schmidhuber, 1997). Random forest is predicted using decision trees and criteria such as Gini impurity (Da, 2025). K-nearest neighbor algorithm also operates based on behavioral similarity.
Research methodology
The present study is applicable in terms of purpose, quantitative in nature, and based on a data mining approach. The statistical population includes all online customers of Kale Company, and a sample of 15 thousand purchase records (after cleaning and preprocessing) was extracted from the company's online shopping transaction database by simple random method. The dependent variable "customer's required product" was defined as binary (select/not select the target product) and the independent variables included product price, past purchase weight volume, product type, past purchase frequency and past purchase amount in Rials. Four classification algorithms including Artificial Neural Network (ANN), Random Forest, Decision Tree and K-Nearest Neighbor (KNN) were implemented using Python 3.x and Scikit-learn and Keras libraries (based on TensorFlow). The implementation process included data preprocessing (cleaning, normalization of quantitative variables and encoding of nominal variables), data splitting into training (80%) and test (20%) parts, training the models using cross-validation to avoid overfitting, and finally evaluating the performance of the models on the test data. The evaluation was performed using the criteria of accuracy (Accuracy = (TN+TP)/(TN+FP+TP+FN)), precision (Precision = TP/(FP+TP)), recall (Recall = TP/(FN+TP)) and F1 score (F1 = 2(PrecisionRecall)/(Precision+Recall)). In order to check the stability of the results, each algorithm was run in 15 consecutive iterations.
Research findings
The results of implementing four machine learning algorithms on the data of 15 thousand online customers of Kale Company are presented in Table 1. As can be seen, the artificial neural network algorithm obtained the highest values ​​in all four criteria of precision, accuracy, recall and F1 score; and is recognized as the superior algorithm. After that, random forest, decision tree and K-nearest neighbor are in the next ranks, respectively.

Table 1 Comparison of machine learning algorithms used in the present study





Algorithms


Accuracy


Precision


Recall


F1-Score




Decision Tree


0.94


0.92


0.958


0.938




random forest


0.946


0.932


0.958


0.945




artificial neural network


0.951


0.942


0.959


0.955




K-nearest neighbor


0.931


0.912


0.944


0.922






In addition to comparing the main performance, the stability of the results was checked in 15 consecutive repetitions. The results showed that the accuracy of all four algorithms had a slight and stable improvement process; so that the artificial neural network reached 94.3% accuracy in the first iteration to 95.1% in the 15th iteration, and the random forest improved from 93.9% to 94.6%, which indicates proper convergence and the lack of strong dependence of the results on the randomness of the data. The confusion matrix also showed that the artificial neural network and the random forest have the lowest type 1 and type 2 errors. In the ranking of the input variables based on the analysis of the importance of features in the artificial neural network algorithm, the variable "weight or weighted volume of purchase" had the greatest impact on the prediction with an approximate share of 35%, followed by "past purchase times" (28%), "product type" (18%), "product price" (12%) and "previous purchase amount in riyals" (7%). This ranking in random forest and decision tree algorithms was also observed to be almost the same, which indicates the high validity of the findings.
Conclusion
The findings of this research are consistent with previous research. Turatti (2025) showed that deep learning models have a high ability to analyze big data and predict online shopping behavior, which is confirmed by the accuracy of 1.95% of the artificial neural network in the current research. Iseal & Michael (2025) also considered analytical models based on behavioral data to be effective for estimating the probability of purchase. Mirasçı & Aksoy (2025) reported the use of machine learning models in the optimization of effective purchasing strategies, and the random forest in the current research showed a good performance with an accuracy of 94.6%. Esmeli & Gokce (2025) emphasized the importance of explainable models and the ranking of the input variables in the current research is considered a step towards clarifying the model. Also, Karimi & Mahmoodi Ranai (2025) confirmed the positive impact of artificial intelligence adoption on business performance, which reinforces the necessity of implementing the proposed model. Darvish et al. (2026) also introduced machine learning algorithms as key technologies. Due to the superior performance of the artificial neural network as well as the acceptable and stable performance of the random forest, these two algorithms are proposed as the main options for the implementation of the intelligent recommender system in Calais. Such a system can reduce perishable product waste, optimize warehouse inventory, increase sales conversion rates, and improve customer satisfaction. For future research, it is suggested to test the proposed model in similar companies, add new variables such as demographic characteristics and purchase time patterns to the model, use more advanced deep learning approaches (such as LSTM and attention-based models), and perform sensitivity analysis on the architecture of the artificial neural network (number of layers, neurons, activation functions) to increase the accuracy and stability of the model.

Keywords

Subjects

Akter, J., Roy, A., Rahman, S., Mohona, S., & Ara, J. (2025). Artificial intelligence-driven customer lifetime value (CLV) forecasting: Integrating RFM analysis with machine learning for strategic customer retention. Journal of Computer Science and Technology Studies7(1), 249-257. http://dx.doi.org/10.32996/jcsts.2025.7.1.18
Asgari, S., Salajeghe, S., & Kamali, M. J. (2024). Clustering of job rotation workstations with the K Means algorithm and ranking skills using the AHP method. Journal of New Approaches in Management and Marketing3(3), 204-222. https://doi.org/10.22034/jnamm.2025.548208.1157 (In Persian)
Bhavishya, S. M., & Anusha, T. (2025). Enhancing Demand Prediction Accuracy in E-commerce With Ensemble Machine Learning. In International Conference on Intelligent Systems and Digital Transformation (ICISD 2025) (pp. 527-538). Atlantis Press. https://doi.org/10.2991/978-94-6463-866-0_44
Breiman, L. (2001). Random forests. Machine learning45(1), 5-32. https://doi.org/10.1023/A:1010933404324
ÇELİK, R., & DİVANOĞLU, S. U. (2025). Teknoloji Kabul Modeli ile Farklı Nesillere Göre Çevrimiçi Satın Alma Davranışının İncelenmesi. Igdir University Journal of Social Sciences/Iğdır Üniversitesi Sosyal Bilimler Dergisi, (38).DOI: 10.54600/igdirsosbilder.1562479
Cortes, C., & Vapnik, V. (1995). Support-vector networks. Machine learning20(3), 273-297. https://doi.org/10.1007/BF00994018
Da, H. (2025). A prediction method of purchasing intention of e-commerce consumers in network marketing. International Journal of Business Intelligence and Data Mining26(1-2), 161-173. http://dx.doi.org/10.1504/ijbidm.2025.143934
Darvish,M., Khodadad Hosseini,S. H., Mansourimoayyed,F. and Goudarzi,G. R. (2026). Exploring Artificial Intelligence in the Automotive Industry: A Bibliometric Analysis, Systematic Review, and Future Research Directions. (e243569). Journal of New Approaches in Management and Marketing5(1), e243569 doi: 10.22034/jnamm.2026.579268.1270 (In Persian)
Esmeli, R., & Gokce, A. (2025). An analysis of consumer purchase behavior following cart addition in e-commerce utilizing explainable artificial intelligence. Journal of Theoretical and Applied Electronic Commerce Research20(1), 28. https://doi.org/10.3390/jtaer20010028
Fang, J., Sun, H., & Kim, J. (2025). Analyzing sequential purchasing behavior and prioritizing brands in loyalty programs. Journal of Product & Brand Management34(7), 963-989. https://doi.org/10.1108/JPBM-12-2023-4870
Gupta, A., & Agarwal, P. (2024). Enhancing customer relationship management: Integrating interpurchase time with rfm segmentation for advanced customer insights. In 2024 OPJU International Technology Conference (OTCON) on Smart Computing for Innovation and Advancement in Industry 4.0 (pp. 1-6). IEEE. https://doi.org/10.1109/OTCON60325.2024.10688087
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation9(8), 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735
Ietto, B., & Orsini, V. (2025). Optimal Inventory Level Control in the Case of Perishable Goods With Unknown Time-Varying Decay Factor: A Data-Driven Supervised Robust Model Predictive Control Approach. IEEE Transactions on Systems, Man, and Cybernetics: Systems. https://doi.org/10.1109/TSMC.2025.3579546
Iseal, S., & Michael, H. (2025). Customer behavior analysis and purchase prediction in e-commerce. Sheed Iseal West. Univ. https://www.researchgate.net/profile/Sheed-Iseal/publication/388779959_Customer_Behavior_Analysis_and_Purchase_Prediction_in_E-Commerce/links/67a5cb55207c0c20fa7c52c6/Customer-Behavior-Analysis-and-Purchase-Prediction-in-E-Commerce.pdf
Jain, A. M. (2025). Predicting e-commerce purchase behavior using a DQN-inspired deep learning model for enhanced adaptability. arXiv preprint arXiv:2506.17543. https://doi.org/10.48550/arXiv.2506.17543
Jauhar, S. K., Harinath, S., Krishnaswamy, V., & Paul, S. K. (2025). Explainable artificial intelligence to improve the resilience of perishable product supply chains by leveraging customer characteristics. Annals of Operations Research354(1), 103-142. http://dx.doi.org/10.1007/s10479-024-06348-z
Karimi, K., & Mahmoodi Ranai, E. (2025). Factors affecting the adoption of artificial intelligence in e-commerce by small and medium-sized enterprises. Journal of New Approaches in Management and Marketing, 4(1), 62-83. https://doi.org/10.22034/jnamm.2025.500793.1067 (In Persian)
Kechri, K., Kleisiari, C., Kyrgiakos, L. S., Vasileiou, M., Tosiliani, D. D., Angelopoulos, V., ... & Vlontzos, G. (2025). Emerging Technologies for Investigating Food Consumer Behavior: A Systematic Review. Comprehensive Reviews in Food Science and Food Safety24(6), e70340. http://dx.doi.org/10.1111/1541-4337.70340
Koren, Y., Bell, R., & Volinsky, C. (2009). Matrix factorization techniques for recommender systems. Computer42(8), 30-37. https://doi.org/10.1109/MC.2009.263
Li, Z., & Hu, J. (2026). Research on analysis and improvement strategies of consumer loyalty on e-commerce platforms based on big data. International Journal of Information and Communication Technology27(16), 1-21. https://doi.org/10.1504/IJICT.2026.152149
Mirasçı, S., & Aksoy, A. (2025). Data-Driven purchasing strategies: Price prediction models and strategy development. Expert Systems with Applications266, 125986. https://doi.org/10.1016/j.eswa.2024.125986
Padmanabhan, R., Hadid, M., Alkhiyami, H. W., Elomri, A., & Kerbache, L. (2025). Inventory Management of Perishable Foods in Omnichannel Retail Using Predictive Analytics: A Case Study. IFAC-PapersOnLine59(10), 691-696. https://doi.org/10.1016/j.ifacol.2025.09.118
Payandenick, M., Wang, Y., Othman, M. K., & Payandenick, M. (2026). ResNetMF: Improving Recommendation Accuracy and Speed with Matrix Factorization Enhanced by Residual Networks. Acta Informatica Pragensia15(1), 1-21. http://dx.doi.org/10.18267/j.aip.280
Satyanarayana¹, S., Kilaru, S., & Venkatrao, K. (2025, December). Reinforcement Learning Framework for Profit Maximization in Perishable Food Supply Chains. In Proceedings of the 1st Engineering Data Analytics and Management Conference (EAMCON 2025) (p. 156). Springer Nature. https://www.google.com/books/edition/Proceedings_of_the_1st_Engineering_Data/ckKlEQAAQBAJ?hl=en&gbpv=0
Sun, Q., Yuan, Y., Xu, B., Gao, S., Zhai, X., Xu, F., & Shi, J. (2025). Innovative technologies reshaping meat industrialization: Challenges and opportunities in the intelligent era. Foods14(13), 2230. http://dx.doi.org/10.3390/foods14132230
Syamsuri, A. R., Arohman, R., Saputra, M. R., Ikhlash, M., & Damanik, S. K. (2025). Integration of machine learning in e-commerce: A systematic literature review on consumer behavior prediction and product recommendation. Social Sciences Insights Journal3(3), 153-162. http://dx.doi.org/10.60036/sg7wnx04
Thiel, D., Hovelaque, V., & David, D. (2024). Simulation model of perishable item picking policies in the buffer stock of a push-pull supply chain. Decision Making and Analysis, 2(1), 88-104. https://dx.doi.org/10.55976/dma.22024129388-104
Turatti, R. C. (2025). Application of artificial intelligence in forecasting consumer behavior and trends in E-commerce. Brazilian Journal of Development11(3), e78442. https://doi.org/10.34117/bjdv11n3-039
Verma, A., Nagar, C., Haryani, S., & Jain, S. (2025, May). Prediction of E-Commerce Shoppers’ Purchasing Intention using Knn Algorithm. In International Conference on Recent Advancements and Modernisations in Sustainable Intelligent Technologies and Applications (RAMSITA 2025) (pp. 63-72). Atlantis Press. https://doi.org/10.2991/978-94-6463-716-8_6
Vuppala, K. C., & Prasad, N. M. (2026). A framework for hybrid CRM personalization: combining rule-based logic with machine learning predictions. International Journal of Data Science and Analytics22(1), 160. https://doi.org/10.1007/s41060-026-01140-7
Wen, Y., & Liu, L. (2026). A prediction method for consumer online purchasing behavior based on big data analysis. Frontiers in Physics14, 1686157. https://doi.org/10.3389/fphy.2026.1686157
Volume 5, Issue 2 - Serial Number 13
Summer 2026
Pages 272-295

  • Receive Date 29 December 2025
  • Revise Date 16 May 2026
  • Accept Date 09 July 2026