Publication: Machine learning algorithm for sales forecasting
Loading...
Date
2023-07
Authors
Yeoh, Zhien
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Sales forecasting is of significant importance in business management as it exerts a substantial influence over resource allocation, marketing strategies, and
financial decision-making, making it a crucial factor in multiple facets of business operations. Therefore, it is crucial to develop a robust machine learning algorithm that ensures precise sales forecasting. This paper aims to determine the best Python programmed prediction model for monthly sales forecasting which focuses on accuracy. There are a total of 5 different sales prediction models using machine learning and deep learning approaches such as linear regression, random forest regression, extreme gradient boosting (XGBoost) regression, long short-term memory (LSTM), and seasonal autoregressive integrated moving average with exogenous variable (SARIMAX) models to be developed in this project. The sales dataset used for training and testing the developed prediction models is obtained from the Kaggle website spanning over 5 years period from January 2013 until December 2017. The accuracy of each developed sales prediction model is evaluated using 3 different performance metrics which are mean absolute error (MAE), root mean squared error (RMSE), and mean absolute percentage error (MAPE) respectively. After comparing the evaluation results, the sales prediction model with the highest accuracy will be selected to forecast the monthly retail sales for the next consecutive 3 months. Overall, the best prediction model for forecasting the monthly retail sales is the LSTM model
with the accuracy of 98.644684% based on MAPE score. In order to make sure that the chosen sales prediction model shows consistent accuracy, the performance of the LSTM model is validated using 10 different sets of sales data with similar attributes that exhibits yearly seasonality pattern. The monthly sales trend for the next 3 months forecasted by the LSTM model exhibits seasonal pattern that closely align with the historical sales trend for the corresponding months. This alignment provides strong evidence of the reliability of the sales prediction model, making it a valuable resource for retail businesses in effectively planning their finances for the future.