concept active week in category churn

appears as: n active week, ctive weeks, active weeks
Fighting Churn with Data

This is an excerpt from Manning's book Fighting Churn with Data.

But there is one important difference between subscriptions and events that impacts the performance of this algorithm, if not the logic: accounts typically have only one or a few subscriptions at a time, but accounts can have a very large number of events. To put it another way, subscriptions are usually small data, whereas events are often big data. It might not be a good idea, therefore, to apply the active period algorithms from the last section directly to the events. Instead, make a simplification: define an active week as seven days during which an account has any event.

Figure 4.12 shows the results of running listing 4.3 on the default simulated dataset and then viewing the results with a SELECT statement like the previous one. Use a LIMIT clause if you have a large amount of data, but you shouldn't need it for the default simulation. Note that the code saved in the GitHub repository is not set up to calculate active periods from the active weeks. I encourage you to make those modifications yourself.

Figure 4.12 Example output from running listing 4.3
A screenshot of a cell phone Description automatically generated

After calculating active weeks and saving them in a table, you can use the same programs as in listings 4.1 and 4.2 to find active periods. Modify these to use the active_week table (table 4.2) instead of the subscription table (table 2.1). Once you calculate active periods from the active weeks, these can be used in place of subscriptions in the standard churn calculation in chapter 2 (listing 2.2).