Sales Data Analysis and Future Sales Prediction Using Machine Learning: An Empirical Study on E-Commerce Dynamics and Demand Forecasting
Reliable sales forecasting and detailed transaction analysis are important for e-commerce businesses because they help teams understand customer demand and plan daily operations. This study examines the Online Retail transaction dataset, covering the period from 1 December 2010 to 9 December 2011. The analysis applies a series of data-cleaning steps to remove cancelled invoices, non-positive prices and quantities, and duplicate records. Valid transactions are retained, including genuine purchases made by customers without an identified customer number. The cleaned data records total sales of GBP 10,642,110.80 across 305 active trading days. To evaluate forecasting performance fairly, the data is split chronologically into 80% for training and 20% for testing, helping prevent information from the future from influencing the models. Two simple forecasting methods—naive lag-1 persistence and a 7-day moving average—are compared with Ridge Regression and Random Forest. Of the four approaches, Random Forest performs best, with a Mean Absolute Error (MAE) of GBP 16,328.43 and a Root Mean Squared Error (RMSE) of GBP 26,595.74. Its MAE is 25.81% lower than that of the naive baseline. The findings also highlight seasonal changes in sales, the absence of Saturday transactions, and the increase in demand before Christmas. These patterns can support better inventory and purchasing decisions.
Authors
- Praveenraj R, Ashwin Kumar S, Suryaprakash S N
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-04
- DOI
- https://doi.org/10.5281/zenodo.23944605
- Primary Topic
- Forecasting Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00