Context: I am working on a classification project. where I recommend items to customers based on their past purchase history.
Question: How will "time leakage" affect training?
Example: Let's say that I am trying to predict today's purchases for some customer. I train only on the previous history, without any knowledge of what will be purchased today. My features consist of a set of binary variables that for any given day in history could be thought of as either recommending (1) or not recommending (0) an item (essentially acting as "dumb" classifiers themselves). For example, one of these features could be whether or not an item is in the customer's top 10 list, etc.
In this case, is it acceptable to compute top 10 over all of history and based on this list create a feature that is applied to each day in history? Of course, this will cause the features from the first day in history to have knowledge of the future.
Or would having a sliding window where feature creation that can only look into the past be more appropriate?