Positive paid product lines
1,003,214 retained rows
Orders per day
Mean absolute error on the test set
Less forecasting error
Compared with the weekly baseline
Chronological test days
15 Aug – 4 Dec 2011
WHY THIS MATTERS
A Forecast Is Useful When It Beats a Clear Baseline
I counted distinct paid UK orders, rather than product lines, and compared next-day forecasts with a simple alternative: reuse the order count from seven days earlier. The combined model reduces MAE from 11.56 to 9.64 orders per day on the same 112-day test period.
EVALUATION DESIGN
Model Choices Were Fixed Before the Final Test
Build the daily target
Audit 1,067,371 product lines and retain 1,003,214 positive paid lines. Count distinct UK orders for the forecast target. Every exclusion is recorded.
Select on earlier periods
Use three 28-day validation folds from 23 May to 14 August 2011. Select model settings and the 80% Random Forest / 10% XGBoost / 10% Ridge weights here.
Evaluate next-day predictions
Hold out 15 August–4 December 2011. Each forecast uses information available after the previous day. Preprocessing is fitted on training data.
FOUR VIEWS OF THE RESULTS
Where the Forecast Improves, and Where It Falls Short
Compare errors.
Inspect the evidence.
Daily Forecasts Compared with Observed Orders
The two lines show the recorded daily order count and the next-day prediction. Inspect a date to see its absolute error; switch to the full test to check whether the final four weeks hide earlier misses.
Daily order forecast
Combining Models Improves Forecast Accuracy
Mean absolute error (MAE) measures the average size of daily forecast errors. The combined model records the lowest MAE among the approaches evaluated on this test set.
The combined model achieves the lowest MAE at 9.64 orders per day, reducing forecasting error by 16.6% compared with the baseline.
Average Improvement Does Not Mean Every Day Improves
The ensemble reduces error on five of seven weekdays. Thursday and Saturday still favor the baseline, which helps identify where a single average hides weaker performance.
Thursday remains a useful review target: MAE is 11.02 orders for the ensemble versus 10.56 for the baseline, on the weekday with the highest observed average demand.
Recent Order History and Calendar Patterns Drive the Forecast
The Saturday indicator and the previous seven-day average have the largest average SHAP contributions. These signals describe how the model uses the retailer’s historical order pattern; they do not establish what causes demand.
Additional research: product demand, sentiment and pricing
ADDITIONAL RESEARCH
Different Targets Require Separate Conclusions
Product-level demand
On 12 real SKUs, the ensemble MAE is 390.17 units versus 304.61 for the rolling-mean baseline. The simpler baseline remains stronger for this task.
Controlled demand dataset
A separate 36-series, 3,744-row generated dataset records MAE 30.75 units, WAPE 6.37% and R² 0.936 for the selected ensemble. Pure Ridge has lower test MAE. These results are not combined with the UCI daily-order evaluation.
Sentiment and pricing
On 650 generated bilingual texts, accuracy falls from 89.2% on a random split to 29.3% on unseen template families. A separate 800-unit pricing experiment tests an 8% discount; it does not establish a margin increase.
WHAT I BUILT
From Raw Transactions to Reproducible Forecasts
I built reusable Python modules, DuckDB analyses, chronological backtesting and SHAP reporting. Automated checks cover distinct-order counting, future-target invariance, model selection and report generation. Source hashes, package versions and predictions make the results traceable. The next step is prospective evaluation on new data; staffing savings have not been measured.
Reviewed 22 October 2026 against the project README and linked evaluation reports. Figures describe the documented dataset or test run.