Utilizing machine learning for sales forecasting in urban supermarkets
Abstract
In contemporary society, the proliferation of supermarkets in densely populated urban areas is providing consumers with an abundance of choices and at the same time put supermarket companies into a highly competitive environment. In order to thrive in this market environment, it is of great importance for supermarket corporations to trace, record, and analyse their sales data so that they could have a better understanding of their customer behaviours. And machine learning is commonly applied in this sort of scenarios. By leveraging the insights generated through predictive analysis, machine-learning models can help companies to optimize inventory management, refine pricing strategies, and create effective marketing campaigns. This article applies three machine-learning algorithms to train and test the same data in order to find the model generating the best prediction of quantity sold for the target dataset. Linear Regression, Random Forest, and XGBoost are the three methods used to create three different machine-learning models. After evaluating the R-squared scores generated by three models, it turns out that the Random Forest Model displays the most precise prediction of the target variable, which generates an R-squared score of 99.27%. Thus, the Random Forest Model is the best model for sales prediction in this case.
References
- Mentzer, J. T., & Moon, M. A. (2004). Sales forecasting management: a demand management approach. Sage Publications.
- Ng, S. T., Skitmore, M., & Wong, K. F. (2008). Using genetic algorithms and linear regression analysis for private housing demand forecast. Building and Environment, 43(6), 1171-1184.
- Zhang, S. L. (2021, January). Machine learning model for sales forecasting by using XGBoost. In 2021 IEEE International Conference on Consumer Electronics and Computer Engineering (ICCECE) (pp. 480-483). IEEE.
- Smith, P. F., Ganesh, S., & Liu, P. (2013). A comparison of random forest regression and multiple linear regression for prediction in neuroscience. Journal of neuroscience methods, 220(1), 85-91.
- “Supermarket Sales.” N.p., n.d. Web. 21 Sept. 2023.
- Sharma, G. “5 Regression Algorithms You Should Know - Introductory Guide!” Analytics Vidhya. N.p., 26 May 2021. Web. 25 Sept. 2023.
- ER, S. (2021). Understand Random Forest Algorithms With Examples (Updated 2023). Analytics Vidhya, 17.
- Quinto, B., & Quinto, B. (2020). Introduction to Machine Learning. Next-Generation Machine Learning with Spark: Covers XGBoost, LightGBM, Spark NLP, Distributed Deep Learning with Keras, and More, 1-27.
- “Supermarket sales_Pred_EDA.” N.p., n.d. Web. 24 Sept. 2023. https://kaggle.com/code/himanshukumar7079/supermarket-sales-pred-eda
- “Supermarket Sales Prediction.” N.p., n.d. Web. 30 Sept. 2023. https://www.kaggle.com/code/aryantiwari123/supermarket-sales-prediction