At the company I work we're trying to define a model to deal with a specific problem, so let me briefly explain how the business works:

1 - Bob has a small Hardware Store, and he buys his stock from company A.

2 - Company A can sell to Bob in 2 ways: direct sell or offer him a Credit Card. This Credit Card (free of charge to get) is managed by company C (my company).

It happens that a lot of clients have the card, but don't use it (they buy directly from A). Let's call the people who only buy from A 'Inactives', and the people who used the card at least once, 'Actives'.

We need a model to target the inactive people who may become active in the future (a propension model). The basic data we have for the Client is: buy and payment history on company A, Industry segment, region, Credit Card Limit and company Date of foundation.

The question is, how to define the target variable? How to quantify this propension? We see two ways to model this:

a) As a Classification problem: people who activated their card within:

[card creation date + t days] are labelled 1, otherwise they are labelled 0.

b) As a Regression problem, people who activated their card within:

[card creation date + t days] are labelled 3 (highest propensity for activation)

[card creation date + 2t days] are labelled 2

[card creation date + 3t days] are labelled 1

[otherwise are labelled 0] (lowest propensity to activation)

So b) would be a 'ranking Regression' or something like that.

What are the basic differences between a) and b)? Is it reasonable to model the target variable like this or I'm missing something obvious?

Some details may be missing, I'll be glad to edit the question. Thanks!

EDIT: I read the paper about coxhp regression, it seems exactly what i need, but I'm still unsure about how to prepare the data.

Suppose i have 2 years of data, and I define an event as

a)Activation within 30 days after card creation. How do I deal with censoring in this case? On the other hand, if I define an event as

b)Activation at anytime after card creation, then it's clear to me that censoring date is the current date.

The concern with b) is that "later Activators" are of less interest, so it raises the question:

If Client A hazard rank is above Client B, does it mean that Client A is expected to have a "faster" activation time? For our needs, propensity = faster activation.



1 Answer 1


This seems like a good fit for a survival model. Rather than trying to model an absolute target like "became active in N days", survival models target the likelihood of something happening per unit time. They are canonically used to predict the death of patients in medical experiments but now see action all over the place.

The response variable to such an algorithm for your problem would be the time from point of record until a customer became active, or the time until the current date if the customer has yet to become active. The output is an instantaneous risk of becoming active.

The Cox Proportional Hazards model is a popular choice. There are implementations Python and R. Here's a cool PDF of someone working through a Cox problem in R.

Edit: Building a classifier (your method (a)) is much easier and doesn't have problems with right censoring. One drawback of your method as you describe is that you only model the first $t$ days of a policy. There may be effects worth measuring for older policies. Consider sampling points along several customers randomly along their history and measuring if they became active within $t$ days rather than starting at card acquisition for everyone.

  • 2
    $\begingroup$ a discrete survival model is almost as easy: you model each period (eg week after creation date) as logistic regression ( with time as one of input variables)... $\endgroup$
    – seanv507
    Commented Sep 3, 2016 at 11:04
  • $\begingroup$ I'm not sure if understood your idea. Can you elaborate a little bit? Thanks! $\endgroup$
    – Fernando
    Commented Sep 7, 2016 at 16:25
  • $\begingroup$ @Dex Groves Thanks! I've edited the question given your answer! $\endgroup$
    – Fernando
    Commented Sep 7, 2016 at 16:26
  • 1
    $\begingroup$ here are lecture notes on discrete time survival analysis ats.ucla.edu/stat/mplus/seminars/DiscreteTimeSurvival. $\endgroup$
    – seanv507
    Commented Sep 9, 2016 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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