Frequency - repeat purchases or count of time periods with a purchase? #268
Replies: 2 comments 2 replies
-
Hey @vishalthatsme, A distinction should be made between raw data time granularity, and the granularity of time aggregation. Data is aggregated to daily time periods by default. If daily timestamps are provided in the raw data, then multiple transactions made on the same day will only be counted as one purchase. However, if hourly data is provided, then the number of transactions made that day will be reflected. The reason for this is because time between transactions is one of the aspects being modeled, and we can't go any more granular than what the raw data provides. It is also possible to roll up raw data to a coarser time granularity (ie, raw daily aggregated to weekly). You may want to do this if modeling over many years of data to help with model convergence. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Those definitions are valid. If the data has not been formatted yet, there is a |
Beta Was this translation helpful? Give feedback.
-
Hi all! First off thanks for creating this awesome library.
Question about how frequency should be defined in the data.
In the pymc-marketing docs, frequency is defined as: "frequency represents the number of repeat purchases that a customer has made, i.e. one less than the total number of purchases"
However, having used lifetimes before I recalled they use a different definition. In the lifetimes docs, the definition of frequency is: "frequency represents the number of repeat purchases the customer has made. This means that it’s one less than the total number of purchases. This is actually slightly wrong. It’s the count of time periods the customer had a purchase in. So if using days as units, then it’s the count of days the customer had a purchase on."
So should frequency be the # of repeat purchases or the count of time periods that the customer had a purchase in?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions