Take a classification task where the goal is to predict which customers are going to buy headache pills in a given week. One of the features that could be created is, for example, how many times the customer bought these pills in the past 60 days. However, the 60 days cutoff is a bit arbitrary and doesn't encode information efficiently. For example, we lose any information of what happened more than 60 days ago. Also, it considers someone who bought pills yesterday as exactly the same as someone who bought them 60 days ago.
I would like to know what are some usual ways to create features like that addressing these issues.