
An AI model can learn how sales vary across products and weeks, but a buyer needs to know how much faith to place in the next forecast. A practical first test is to compare it with numbers a buyer could have calculated before that week began. One ornament sold by a UK retailer shows why the choice of week matters.
What an invoice can tell a forecaster
The UCI Online Retail invoice dataset contains dated invoice lines. For stock code 85123A, a white hanging heart T-light holder, Yenra summed positive quantities on invoices other than cancellations. We used Monday-to-Sunday weeks, including days without a matching invoice as zero recorded units. These are gross positive invoiced units. They do not measure unmet demand, stock on hand or a customer's reason for buying.

Which simple forecast came closer?
For the eight complete weeks ending October 16 through December 4, 2011, we compared the preceding week’s units with the mean of the preceding four weeks. Each forecast uses only information from earlier weeks. Their mean absolute errors were 613.38 units and 392.16 units, respectively. Yenra also tested a three-neighbor AI forecaster. It found the three earlier weeks whose preceding sales were closest to the current preceding week, then averaged the sales that followed those three examples. Only completed weeks were eligible, with recent examples winning ties. Its mean absolute error was 494.13 units, between the two baselines. In the week ending November 6, sales jumped to 1,704 and all three forecasts fell well short.

Download the observations and all three forecasts (CSV). The week-ending date is Sunday. The mean uses only the previous four complete weeks. Adapted from Daqing Chen’s Online Retail (2015), UCI Machine Learning Repository, CC BY 4.0. Yenra calculated the comparison forecasts.

What a learned forecast would need to improve
The M5 competition organizers’ data, benchmarks and submissions provides a larger, separate benchmark for learned forecasts across retail products and aggregation levels. A more complex method could be tested by issuing its forecasts on the same dates and score the same item and unit. A buyer would then combine it with lead time, stock and the cost of excess or missed sales. A better weekly forecast alone does not prove better availability.

The same order history can reveal which products a picker often collects together. How AI Uses Order Patterns to Make Warehouse Space More Useful
Try it with the evidence
Find the week where the average lost
Source notes. Actual positive invoiced units for the week ending December 4, 2011 were 726. The prior week predicted 898. The prior-four-week mean predicted 1,124.75. The eight-week mean absolute errors were 613.38 and 392.16 units, respectively. The three-neighbor forecast was about 1,712.67 units for December 4, with an eight-week mean absolute error of 494.13.
Prompt. Calculate the three absolute errors for December 4 and rank all three forecasts across eight weeks. Could an absent sale establish that nobody wanted the item?
Check your reading
The December 4 errors were 172 units for the prior week, 398.75 for the four-week mean and about 986.67 for the AI estimate. Across eight weeks the four-week mean ranked first, AI second and prior week third. Stockouts and absent demand can both leave a missing sale.
Illustrated field notes
Orders, stock and deliveries



Risk, resources and visibility



