Get startedGet started for free

The timegap

1. The timegap

To end this chapter on advanced basetable concepts, you will learn how to deal with the timegap in predictive modeling.

2. Timegap: motivation (1)

Consider again the predictive modeling problem where you want to predict who will make a donation larger than 50 Euro in April 2019. Let's stand still at how this model will be used.

3. Timegap: motivation (2)

Assume you want to send a letter to donors that are very likely to make a donation according to the model, in order to stimulate them to make a high donation.

4. Timegap: motivation (3)

Some of the predictors rely on the donations made last month, in March 2019. This means that the model can only be constructed after April first.

5. Timegap: motivation (4)

Moreover, gathering the data and running the model needs some time,

6. Timegap: motivation (5)

as well as preparing the letter and sending it out to the donors. This means that it can happen that the letter will only reach the donors by the end of April. This is too late, as you want to stimulate the donors to make a high donation in April.

7. Adding a timegap

To deal with this problem, a timegap can be added to the timeline. It is a period between the period used to calculate candidate predictors and the target period, that is foreseen to gather data, run the model and prepare the campaign you want to do. In many businesses, a timegap of one month is used, as data is refreshed monthly. In the example, the timegap covers March 2019. This means that all the candidate predictors are calculated using data before March first 2019. Indeed, during the timegap, only that data is available for sure.

8. Reconstructing the timeline in history (1)

When reconstructing the timeline in history to construct the basetable, also the timegap should be reconstructed.

9. Reconstructing the timeline in history (2)

For instance, if you want to reconstruct the timeline one year back in time, March 2018 serves as timegap, and the candidate predictors can only use information available before March first 2018.

10. Constructing the basetable

When constructing the basetable, the procedure is the same as if no timegap is taken into account, except for the dates used to calculated the candidate predictors. For instance, if you want to calculate the maximum donation made last month, you should consider donations made in February 2018 instead of March 2018. The target period remains the same. Note that no data from the timegap is used, nor to construct the predictive variables, neither to construct the target values!

11. Let's practice!

Time to close this Chapter with some exercises in which you will learn how to construct a basetable that takes into account a timegap.