1
$\begingroup$

I am building a file with sample data that has a bunch of variables:

date, customer_id, amount_spent, number_of_transactions, time_since_last_transaction etc. that i am mapping against days_to_churn

I will train my model using Keras to map the emboldened variables to the italicised days_to_churn. However there are many instances where a user is an active subscriber and this value is blank.

How would I go about incorporating this to ensure that I am not excluding active people from my churn calculations?

$\endgroup$
1
$\begingroup$

In your setup, the only way is probably to set it to some large number, say 365. However, this will force you to discard all dates that are less than 365 days old, because you can't be certain a customer won't churn before he reaches 365 days (which is still in the future).

A better and more common way is to look at churn on a rolling window basis, e.g. will the customer churn within the next 30 days. This turns your problem into a classification problem. That way you only need to discard the most recent 30 days of data.

$\endgroup$
4
  • $\begingroup$ Thanks for this. Will I encode someone churning numerically as a 1 and not churning as a 0? I am wondering how I would keep the output continuous - ideally a probability that they would churn within 30 days. $\endgroup$ Jan 8 '19 at 17:10
  • $\begingroup$ exactly, the labels will be 1 and 0. In keras you can fit a classifier with a binary cross-entropy loss to the labels that will give you (continuous) probability outputs $\endgroup$
    – oW_
    Jan 8 '19 at 17:33
  • $\begingroup$ Another question - when producing training data, my current methodology is to build a snapshot of a user every day they are a registered subscriber. I am defining a churned individual as someone who hasn't transacted in 60 days; so I am taking every day after 60 days of registration and determining on each of these days how much a user has spent, the number of transactions, etc. Is this a sound way to do things or should I be more discretionary? From day-to-day for most individuals, very little changes. $\endgroup$ Jan 11 '19 at 17:54
  • $\begingroup$ Sounds reasonable. You can also include activities from previous days and not just from that day e.g. spending average for last 14 days, change in spending from previous week and a month ago, etc.. You should also include the number of days since the start of the subscription as a feature. Good luck with your project. $\endgroup$
    – oW_
    Jan 11 '19 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.