American Journal of Business and Operations Research cover
American Journal of Business and Operations Research

Online ISSN 2692-2967

Full Length Article

Volume 10 • Issue 2 • PP: 20–26 • 2023

A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce

Irina V. Pustokhina 1* ,
Denis A. Pustokhin 2
1Department of Entrepreneurship and Logistics, Plekhanov Russian University of Economics, Moscow 117997, Russia
2Department of Logistics, State University of Management , Moscow 109542,
* Corresponding Author.
verified

Open Access & Copyright

© 2023 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Abstract

This paper presents a comparative analysis of traditional forecasting methods and machine learning (ML) techniques for sales prediction in e-commerce. We first review the literature on both traditional and ML methods for sales prediction in e-commerce, highlighting their strengths and weaknesses. The study uses a dataset of daily sales from an e-commerce retailer to conduct a comprehensive empirical study that compares the performance of methods from both categories. The analysis considers different forecasting horizons and evaluates prediction accuracy using several performance metrics, including mean absolute error and mean squared error. The study finds that ML techniques generally outperform traditional methods, especially for longer forecasting horizons. However, some traditional methods, such as Holt-Winters, can also perform well under certain conditions. Our study provides insights into the relative strengths and weaknesses of traditional and ML methods for sales prediction in e-commerce and can guide practitioners in selecting appropriate methods for their specific requirements.

Full Text

This HTML version is generated from the article PDF. The PDF remains the version of record.

1. INTRODUCTION

patterns in the data. Sales prediction in e-commerce is a challenging problem because of the large volume and complexity of the data and the need for accurate and timely predictions to support business decisions.

Sales prediction in e-commerce refers to the task of forecasting future sales of products or services in an online retail environment. Accurate sales prediction is crucial for effective inventory management, pricing strategy, and resource allocation in e-commerce. Traditional forecasting methods, such as time-series analysis and regression analysis, have been widely used for sales prediction in e-commerce. However, these methods may not be able to capture the complex relationships between variables or adapt to changing patterns in the data. In recent years, there has been a growing interest in the use of ML techniques for sales prediction in e-commerce. ML methods can handle large volumes of data, capture complex relationships between variables, and adapt to changing

Traditional forecasting methods, such as time-series analysis and regression analysis, have been widely used for sales prediction in e-commerce. Time-series analysis involves analyzing historical sales data to identify patterns and trends and making predictions based on those patterns. Regression analysis involves identifying the relationship between sales and other variables, such as price, marketing spend, and seasonality. However, these methods may not be able to capture complex relationships between variables or adapt to changing patterns in the data. In recent years, there has been growing interest in ML techniques for sales prediction in e-commerce. ML methods, such as artificial neural networks (NNs), support vector machines, and random forests (RFs), can handle large volumes of data, capture complex relationships between variables, and adapt to changing patterns in the data. ML techniques have shown promising results in sales prediction and are becoming increasingly popular among practitioners.

The motivation for this paper stems from the increasing importance of accurate sales prediction in the e-commerce industry. With the growing volume and complexity of data in the ecommerce domain, traditional forecasting methods may not be sufficient to provide accurate and timely predictions. ML techniques have shown promise in handling large volumes of data, capturing complex relationships between variables, and adapting to changing patterns in the data. However, the effectiveness of these methods compared with traditional methods in e-commerce remains an open question. Therefore, this paper aims to provide a comprehensive comparison of the performance of traditional forecasting methods and ML techniques for sales prediction in e-commerce, to help inform decision-makers in the industry.

The literature on sales prediction in e-commerce has explored both traditional forecasting methods and ML techniques. In recent years, there has been growing interest in ML techniques for sales prediction. These methods can handle large volumes of data, capture complex relationships between variables, and adapt to changing patterns. Kraus et al. [1] provided an overview of deep-learning models and their applications in business analytics and operations research, including forecasting, inventory management, fraud detection, customer segmentation, and supply-chain management. They also discussed managerial implications, including the importance of data quality and the need for skilled data scientists.

Barboza et al. [2] explored ML models for bankruptcy prediction. They compared traditional statistical models with ML algorithms, including decision trees (DTs), neural networks (NNs), and support vector machines. Using financial ratios and other financial indicators to train and test the models, they showed that ML models generally outperform traditional statistical models in accuracy and predictive power. Bohanec et al. [4] investigated how to explain ML models in sales predictions. They proposed an approach for generating explanations based on local fidelity and concluded that explanations can improve interpretability and facilitate adoption in real-world applications. Syam and Sharma [5] discussed the potential impact of ML on sales research and practice in the fourth industrial revolution. They reviewed key trends and challenges facing sales organizations and described applications of ML and AI in sales, including lead scoring, customer segmentation, and personalized product recommendations.

Fabbri and Moro [6] explored recurrent networks for stockmarket trading by predicting daily closing prices of the Dow Jones Industrial Average (DJIA). They trained and tested the model on historical DJIA prices and news articles to learn temporal dependencies between news and market behavior. Vijh et al. [7] investigated ML techniques for predicting stock closing prices, including regression and tree models. They used historical stock prices and financial indicators and evaluated the models using measures such as mean absolute error and root mean square error. Park and Bae [8] used housing features, such as square footage, number of bedrooms, and location, to train and test ML models and compare their performance with traditional regression models.

Mai et al. [9] explored deep-learning models for predicting bankruptcy using textual disclosures. Their approach incorporated the content of financial reports in addition to traditional financial ratios. They used annual reports from bankrupt and non-bankrupt firms to train and test deep-learning models, including convolutional and recurrent networks (RNNs). Chou and Nguyen [10] presented a forward-forecasting approach for stock prices using a sliding-window metaheuristicoptimized machine-learning regression (SWMOMLR) model. They used historical stock prices and financial indicators to generate input-output pairs with a sliding window and applied genetic algorithms and particle-swarm optimization to tune the regression model’s hyperparameters.

3. CASE STUDY AND EXPLORATORY ANALYSIS

The BigMart case study is a well-known example of using data analytics to predict sales in the retail industry. It focuses on a fictional retail company called BigMart that operates across various locations in different cities. The goal is to predict sales of various products at different stores based on historical data. The dataset contains information on product and store characteristics, including Item_Identifier, Item_Weight, Item_Fat_Content, Item_Visibility, Item_Type, Item_MRP, Outlet_Identifier, Outlet_Establishment_Year, Outlet_Size, Outlet_Location_Type, Outlet_Type, and Item_Outlet_Sales. It also contains sales information for each product at each store over a period of time.

Outlet_Identifier is important because it identifies individual retail outlets and helps analyze sales trends, inventory management, and store performance. Each outlet has a unique identifier; its distribution is shown in Figure 1. Analyzing Item_Type provides insight into the product mix and sales trends. Retailers can identify top-selling products and categories and allocate resources accordingly (Figure 2). Item_Fat_Content is important because it provides insight into customers’ health consciousness and preferences for different types of food products. Its distribution can help retailers identify the popularity of low-fat or non-fat products and incorporate them into inventory to meet demand (Figure 3). Histograms and box plots are used to visualize the distribution of continuous variables in Figure 4.

Figure 1. The distribution of Outlet_Identifier in BigMart sales.
Figure 1. The distribution of Outlet_Identifier in BigMart sales.
Figure 2. The distribution of Item_Type in BigMart sales.
Figure 2. The distribution of Item_Type in BigMart sales.
Figure 3. The distribution of Item_Fat in BigMart sales.
Figure 3. The distribution of Item_Fat in BigMart sales.

4. MACHINE LEARNING FOR SALES PREDICTION

This section reviews ML regression algorithms commonly used for sales prediction and their main characteristics. These algorithms are widely used in retail, and their effectiveness depends on the amount and quality of data, algorithm choice, and hyperparameter tuning.

4.1 Linear Regression

Linear regression models the relationship between a dependent variable (usually sales) and one or more independent variables using a linear equation. Its objective is to estimate coefficients that minimize the sum of squared residuals. Once estimated, the model predicts sales for new observations from their independent-variable values. Linear regression is simple, effective for linear relationships, and easy to interpret and visualize. However, it assumes a linear relationship and may not capture complex interactions or nonlinear relationships found in real-world scenarios.

4.2 Logistic Regression

Logistic regression models the probability of a binary outcome (such as whether a customer buys a product) from one or more predictor variables. It uses a logistic function to map inputs to a probability between zero and one and estimates coefficients by maximizing the likelihood of the observed outcomes. The fitted model predicts sales probabilities for new observations. Logistic regression can capture nonlinear relationships between the dependent and independent variables and is well suited to binary outcomes. However, it assumes a linear relationship between the outcome’s log-odds and the independent variables, may not suit multiclass problems, requires large samples, and can be sensitive to outliers and multicollinearity.

4.3 Polynomial Regression

Polynomial regression models the relationship between a dependent variable (sales) and independent variables using a polynomial function. It is a form of linear regression in which the relationship is represented by an nth-degree polynomial. The model estimates polynomial coefficients to find a curve that best fits the data. The polynomial degree can vary with data complexity and the degree of nonlinearity in the relationship.

4.4 Ridge Regression

Ridge regression models the relationship between sales and independent variables while addressing multicollinearity, which occurs when independent variables are highly correlated and can make coefficient estimates unstable. Ridge regression adds a penalty proportional to the squared coefficient magnitudes to the sum of squared residuals, shrinking coefficients toward zero. A regularization parameter controls the shrinkage and is typically selected through cross-validation. Ridge regression can improve coefficient stability and accuracy, especially in the presence of multicollinearity. However, it assumes that all independent variables are equally important, which may not hold in every application.

4.5 Lasso Regression

Lasso regression models the relationship between sales and independent variables while addressing multicollinearity. Like ridge regression, it adds a penalty to the sum of squared residuals, but uses the L1 norm of the coefficients. Because this norm is the sum of the absolute coefficient values, Lasso can shrink some coefficients exactly to zero, making it useful for feature selection. The regularization parameter controls shrinkage and feature selection and is typically chosen through cross-validation.

4.6 Decision Tree Regression

Decision tree (DT) regression is a non-parametric algorithm that models the relationship between sales and independent variables. It recursively splits data into subsets based on the independent variables, aiming to minimize the variance of the dependent variable within each subset. Each split uses a decision rule that maximizes information gain or reduces variance. The resulting tree consists of decision nodes, which represent rules, and leaf nodes, which represent predicted values. DT regression handles numerical and categorical variables without distributional assumptions, and trees are easy to interpret and visualize. However, complex trees can overfit and generalize poorly. Ensemble methods such as RFs and gradient boosting can combine multiple trees to improve performance and reduce overfitting.

4.7 Random Forest Regression

RF is an ensemble-learning algorithm that combines multiple DTs to improve prediction accuracy and robustness. For sales prediction, it models the relationship between sales and variables such as product attributes, store location, and demographic data. It creates many trees, each trained on a random subset of data and independent variables, and aggregates their

Figure 4. Visualization of continuous-variable distributions in BigMart sales.
Figure 4. Visualization of continuous-variable distributions in BigMart sales.

predictions, typically by averaging. Randomness in sampling helps reduce variance and overfitting. RF can handle numerical and categorical data and identify important features. However, it can be computationally expensive, may require hyperparameter tuning, and can be harder to interpret than a single DT.

4.8 Support Vector Regression

Support vector machines (SVMs) are used for classification and regression. In sales prediction, an SVM can predict product sales from product attributes, store location, and demographic data. The algorithm finds a hyperplane that separates data into two classes; in the sales context these are high and low sales. It chooses a hyperplane that maximizes the margin to the closest data points. A kernel function maps nonlinear data to a higher-dimensional space, allowing the SVM to fit complex relationships between independent variables and sales. SVMs can be less sensitive to outliers than linear regression and can handle numerical and categorical data. However, they can be computationally expensive for large datasets and require hyperparameter tuning.

Figure 9. The prediction plot for Ridge Regression.
Figure 9. The prediction plot for Ridge Regression.
Figure 5. The prediction plot for Linear Regression.
Figure 5. The prediction plot for Linear Regression.
Figure 10. The prediction plot for Gradient Boosting Regressor.
Figure 10. The prediction plot for Gradient Boosting Regressor.
Figure 6. The prediction plot for SGD Regressor.
Figure 6. The prediction plot for SGD Regressor.
Figure 11. The prediction plot for Support Vector Regression.
Figure 11. The prediction plot for Support Vector Regression.
Figure 7. The prediction plot for Lasso Regression.
Figure 7. The prediction plot for Lasso Regression.
Figure 12. The prediction plot for Decision Tree Regressor.
Figure 12. The prediction plot for Decision Tree Regressor.
Figure 13. The prediction plot for KNeighbors Regressor.
Figure 13. The prediction plot for KNeighbors Regressor.
Figure 8. The prediction plot for Ridge Regression.
Figure 8. The prediction plot for Ridge Regression.
Table 1. Comparative performance of ML methods and traditional forecasting methods on BigMart data.
Table 1. Comparative performance of ML methods and traditional forecasting methods on BigMart data.

4.9 Neural Network Regression

NN regression is based on the structure and function of the human brain. A network can be trained to predict product sales from product attributes, store location, and demographic data. It consists of interconnected nodes, or neurons, arranged in layers that process and transform inputs to produce an output. Each neuron applies a mathematical function to its input and passes the result to the next layer; the final output predicts sales for a given set of inputs. NNs can handle complex, nonlinear relationships and numerical and categorical data. They can adapt to new patterns, which is useful for dynamic prediction. However, they can be computationally expensive to train, require substantial data and computing resources, and depend strongly on network architecture and parameter tuning.

5. RESULTS AND DISCUSSIONS

This section compares ML algorithms for BigMart sales prediction. Several ML regression models and traditional regressors are evaluated for predicting product sales; prediction plots for the models are shown in Figures 5–13. The experimental results show that RF and NN regression perform better than the other algorithms in accuracy and in handling complex relationships between inputs and sales. RF handles nonlinear relationships by creating and aggregating multiple decision trees, while NN regression can model complex nonlinear relationships. Both require more computational resources than some tested algorithms, such as linear and polynomial regression. DT regression performs well for some product categories but is less accurate for others. The detailed comparison is presented in Table 1.

6. CONCLUSION

This study presents a comparative analysis of traditional forecasting methods and ML techniques for sales prediction in e-commerce and provides insights into their relative performance. The results demonstrate that ML techniques, particularly NNs and DTs, outperform traditional methods in accuracy and robustness. The findings also highlight the importance of carefully selecting and tuning ML models to ensure optimal performance. This paper provides a roadmap for decision-makers in e-commerce to choose an appropriate sales-prediction method based on the context and data characteristics. As the industry evolves, these methods should be continually evaluated and refined to ensure accurate and timely predictions and ultimately support business success.

References

[1] M. Kraus, S. Feuerriegel, and A. Oztekin. Deep learn-ing in business analytics and operations research: Mod-els, applications and managerial implications. Euro-pean Journal of Operational Research, 281(3):628–641, 2020.

[2] F. Barboza, H. Kimura, and E. Altman. Machine learn-ing models and bankruptcy prediction. Expert Systems with Applications, 83:405–417, 2017.

[3] B. M. Pavlyshenko. Machine-learning models for sales time series forecasting. Data, 4(1):15, 2019.

[4] M. Bohanec, M. K. Borštnar, and M. Robnik-Šikonja. Explaining machine learning models in sales predic-tions. Expert Systems with Applications, 71:416–428, 2017.

[5] N. Syam and A. Sharma. Waiting for a sales renaissance in the fourth industrial revolution: Machine learning and artificial intelligence in sales research and practice. Industrial Marketing Management, 69:135–146, 2018.

[6] M. Fabbri and G. Moro. Dow jones trading with deep learning: The unreasonable effectiveness of recurrent neural networks. In Data, pages 142–153, 2018.

[7] M. Vijh, D. Chandola, V. A. Tikkiwal, and A. Kumar. Stock closing price prediction using machine learning techniques. Procedia Computer Science, 167:599–606, 2020.

[8] B. Park and J. K. Bae. Using machine learning algo-rithms for housing price prediction: The case of fairfaxcounty, virginia housing data. Expert Systems with Ap-plications, 42(6):2928–2934, 2015.

[9] F. Mai, S. Tian, C. Lee, and L. Ma. Deep learning mod-els for bankruptcy prediction using textual disclosures. European Journal of Operational Research, 274(2):743–758, 2019.

[10] J. S. Chou and T. K. Nguyen. Forward forecast of stock price using sliding-window metaheuristic-optimized machine-learning regression. IEEE Transactions on Industrial Informatics, 14(7):3132–3142, 2018.

[11] S. Dhote, C. Vichoray, R. Pais, S. Baskar, and P. Mo-hamed Shakeel. Hybrid geometric sampling and ad-aboost based deep learning approach for data imbal-ance in e-commerce. Electronic Commerce Research, 20:259–274, 2020.

[12] B. Nithya and V. Ilango. Predictive analytics in health care using machine learning tools and techniques. In 2017 International Conference on Intelligent Comput-ing and Control Systems, pages 492–499, 2017.

[13] P. Oncharoen and P. Vateekul. Deep learning for stock market prediction using event embedding and technical indicators. In 2018 5th International Conference on Ad-vanced Informatics: Concept Theory and Applications, pages 19–24, 2018.

[14] A. Martínez, C. Schmuck, S. Pereverzyev, C. Pirker, and M. Haltmeier. A machine learning framework for customer purchase prediction in the non-contractual setting. European Journal of Operational Research, 281(3):588–596, 2020.

[15] B. Marr. Artificial Intelligence in Practice: How 50 Successful Companies Used AI and Machine Learning to Solve Problems. John Wiley & Sons, 2019.

[16] M. Robnik-Šikonja and M. Bohanec. Perturbation-based explanations of prediction models. In Human and Machine Learning: Visible, Explainable, Trustwor-thy and Transparent, pages 159–175. 2018.

[17] I. Lee and Y. J. Shin. Machine learning for enterprises: Applications, algorithm selection, and challenges. Busi-ness Horizons, 63(2):157–170, 2020.

[18] B. M. Henrique, V. A. Sobreiro, and H. Kimura. Lit-erature review: Machine learning techniques applied to financial market prediction. Expert Systems with Applications, 124:226–251, 2019.

[19] Y. Zhu, L. Zhou, C. Xie, G. J. Wang, and T. V. Nguyen. Forecasting smes’ credit risk in supply chain finance with an enhanced hybrid ensemble machine learning ap-proach. International Journal of Production Economics, 211:22–33, 2019.

[20] R. Cui, S. Gallino, A. Moreno, and D. J. Zhang. The operational value of social media information. Produc-tion and Operations Management, 27(10):1749–1769, 2018.

[21] J. Yan, C. Zhang, H. Zha, M. Gong, C. Sun, J. Huang, S. Chu, and X. Yang. On machine learning towards predictive sales pipeline analytics. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 29, 2015.

[22] M. Tkáˇc and R. Verner. Artificial neural networks in business: Two decades of research. Applied Soft Com-puting, 38:788–804, 2016.

[23] S. McNally, J. Roche, and S. Caton. Predicting the price of bitcoin using machine learning. In 2018 26th Euromi-cro International Conference on Parallel, Distributed and Network-Based Processing, pages 339–343, 2018.

[24] R. Akerkar. Artificial Intelligence for Business. Springer, 2019.

[25] T. D. Akinosho, L. O. Oyedele, M. Bilal, A. O. Ajayi, M. D. Delgado, O. O. Akinade, and A. A. Ahmed. Deep learning in the construction industry: A review of present status and future innovations. Journal of Building Engineering, 32:101827, 2020.

[26] Y. Bao, B. Ke, B. Li, Y. J. Yu, and J. Zhang. Detect-ing accounting fraud in publicly traded us firms using a machine learning approach. Journal of Accounting Research, 58(1):199–235, 2020.

[27] A. Sharma, D. Bhuriya, and U. Singh. Survey of stock market prediction using machine learning approach. In 2017 International Conference of Electronics, Commu-nication and Aerospace Technology, volume 2, pages 506–509, 2017.

[28] M. Nabipour, P. Nayyeri, H. Jabani, S. Shahab, and A. Mosavi. Predicting stock market trends using ma-chine learning and deep learning algorithms via contin-uous and binary data: A comparative analysis. IEEE Access, 8:150199–150212, 2020.

[29] C. Fan, Y. Zhang, Y. Pan, X. Li, C. Zhang, R. Yuan, D. Wu, W. Wang, J. Pei, and H. Huang. Multi-horizon time series forecasting with temporal attention learning. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 2527–2535, 2019.

[30] M. H. Rafiei and H. Adeli. A novel machine learning model for estimation of sale prices of real estate units. Journal of Construction Engineering and Management, 142(2):04015066, 2016.

Continue Reading

View the full issue arrow_forward

Cite This Article

Choose your preferred format

format_quote
Pustokhina, Irina V., and Denis A. Pustokhin. “A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce.” American Journal of Business and Operations Research, vol. 10, no. 2, 2023, pp. 20–26. https://doi.org/10.54216/AJBOR.100205.
Pustokhina, I. V., & Pustokhin, D. A. (2023). A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce. American Journal of Business and Operations Research, 10(2), 20–26. https://doi.org/10.54216/AJBOR.100205
Pustokhina, Irina V. and Denis A. Pustokhin. “A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce.” American Journal of Business and Operations Research 10, no. 2 (2023): 20–26. https://doi.org/10.54216/AJBOR.100205.
Pustokhina, I.V. and Pustokhin, D.A. (2023) ‘A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce’, American Journal of Business and Operations Research, 10(2), pp. 20–26. Available at: https://doi.org/10.54216/AJBOR.100205.
Pustokhina IV, Pustokhin DA. A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce. American Journal of Business and Operations Research. 2023;10(2):20-26. doi:10.54216/AJBOR.100205
I. V. Pustokhina and D. A. Pustokhin, “A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce,” American Journal of Business and Operations Research, vol. 10, no. 2, pp. 20–26, 2023, doi: 10.54216/AJBOR.100205.
policy

Publisher's Note

The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.

Digital Archive Ready