E-Commerce Sales Forecasting by Comparing LSTM, SARIMA, and XGBoost Models
Keywords:
E-Commerce Sales Forecasting, Time-Series Prediction, Deep Learning in Sales Forecasting, SARIMA Model, XGBoost for Forecasting, Long Short-Term Memory (LSTM), Machine Learning for Sales Prediction, Data-Driven Demand Forecasting, Hybrid Forecasting Models, AI in Retail AnalyticsAbstract
Accurate sales forecasting is very important in e-commerce, help businesses to manage inventory, adjustment in pricing, and run effective campaigns for advertisements. However, the unpredictable (nonlinear) and continuously changing nature of e-commerce sales data presents challenges for traditional forecasting techniques. While methods such as SARIMA (Seasonal Autoregressive Integrated Moving Average) have been used most in the industry, machine learning models such as XGBoost (Extreme Gradient Boosting) and deep learning models such as LSTM (Long Short-Term Memory) networks can provide alternative solutions. Although, these models lakes in handling complex sales trends.
This study compares SARIMA, XGBoost and LSTM using real-world e-commerce sales data. Three evaluation metrics that are used to assess these models: MAE (Mean Absolute Error), RMSE (Root Mean Squared Error), and R² (R-squared). The analysis and findings show that LSTM outperforms SARIMA and XGBoost, as it gets the lowest MAE (59,553.15) and RMSE (75,859.20) and a positive R² score of 0.561, these stats highlight its ability to capture nonlinear trends. On the other hand, SARIMA and XGBoost get negative R² values (-1.41 and -2.33, respectively), which is less accurate as compared to LSTM.
The results show the importance of deep learning, particularly LSTM, in e-commerce sales forecast enhancement. Businesses want to improve demand forecasting should prefer deep learning methods. Moreover, this research shows the limitations of traditional statistical and machine learning models when sales data is nonlinear. Future research should involve hybrid techniques that combine statistical models with deep learning which will improve forecasting accuracy.





