I have a dataset which has around 10K records.

My objective is to predict whether the customer will churn or not. Binary classification problem with each class representing around 55:45 proportion and 20 features.

I understand when it's just about prediction, I can apply some binary classification algorithm and find out whether the customer churns or not

But how do I incorporate the objective of finding whether the customer will churn in 30 days or not?

Another example is find whether patient will be dead within 30 days from the date of discharge. I have his date of discharge along with other features like Blood pressure, Cholesterol etc.

Rather than just predicting whether he will be dead or not anytime in future, I would like to restrict it to 30 days from date of discharge.

Hope I gave the details to help you understand the question better.


It depends how deep technichally you want to go. You can apply a slight modification of a Survival methods/ cox models that relate the time that passes, before some event occurs, to one or more covariates that may be associated with that quantity of time.

Also if you group de features you can make the problem look like as a classical binary classification problem. But you should do a bit of data engineering in order to have the labels this good.

Probably the easiest is to modify your data and make it look like a classification problem when the target is if the person went away in the next months.

  • $\begingroup$ Hi, thanks for the response. Upvoted. I will look at cox models. But can I request you to give an example on how to modify my target to look like person will pass away in next month or not? If it's ordinary classifcation, there is no time constraint to it $\endgroup$ – The Great Feb 17 '20 at 10:23

Beeing X in the future and beeing X in specific time in the future is just a subset of the first one.

So what one really needs to do is just determine the probabilities (or parameters that give us these probabilities)


Where you can model t, also as your feature. So just fit a model on this data, where you have mutliclassification of:

  1. dead within 30 days
  2. dead after 30 days
  3. alive after 30 days
  • $\begingroup$ Thanks for the response. Upvoted $\endgroup$ – The Great Mar 13 '20 at 3:18

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.