1
$\begingroup$

Suppose I have a time series. Let's say it is of the number of sales in a shop. Suppose I am looking to make two models - model 1 which predicts future values by weekly time steps (total sales per week, i.e. 1-7 days from now, then 8-14 days from now, then 15-21, etc.) and model 2 which predicts future values by monthly time steps (total sales per month).

Note that I have not decided what models each of these will be yet. But I cannot assume that the data/features used to train each model will be the same.

Let's say I make predictions with both models for the period of time ranging from the start of September to the end of October (inclusive). So this is 3 months, in total consisting of exactly 13 weeks. Therefore I will have 13 predictions from model 1, and 3 predictions from model 2.

Let $S_1$ be the sum of the 13 predictions for model 1, and $S_2$ be the sum of the 3 predictions for model 2. How can I ensure that $S_1$ and $S_2$ are the same?

$\endgroup$

1 Answer 1

1
$\begingroup$

One challenge is that 13 weeks and 3 months are not necessarily the same time period: September to November is 91 days and 13 weeks, but October to December is 92 days. But let's not focus on that.

The simplest approach would be to post-process your forecasts, scaling both to achieve the same sum. One possibility for the target common sum would be the average of the two:

$$ S := \frac{S_1+S_2}{2}, $$

but you could use any other value for $S$, like $S:=S_1$ (scaling the monthly predictions to equal the sum of the weekly ones), or $S:=S_2$ (the other way around).

Once you have $S$, simply scale all the weekly predictions by a factor of $\frac{S}{S_1}$, and all the monthly ones by a factor of $\frac{S}{S_2}$. Then the new weekly forecasts and the new monthly forecasts will both sum up to $S$.

If you want to delve deeper, there are some papers on the Multiple Aggregation Prediction Algorithm (MAPA) like Kourentzes et al. (2014) where you take forecasts on different temporal granularities and optimally combine them along the grouping hierarchy, but this is a bit more advanced and more general.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.