Search code examples
machine-learningtimedeep-learningclassificationsurvival-analysis

Classification problems with an implicit time component


Most of the classification problems does not have a time element. eg. image recognition.

Therefore, application of classification algorithms such as LR, Random Forrest or Neural Networks is straight forward. However some classification problems have an implicit time component. eg. churn classification/default classification. That is, it is not just a matter of churn/non churn, but most importantly when!

In the past, what we have done is discretizing the time window. That is, if we want to predict churn over the next month, and if a customer had been active for 12 months and churned during the 13th month, we would create 13 rows for this customer. Out of that 12 would have non churn as the response and 1 will have churn as the response.

We can obviously fit a survival model for this kind of problems, but I’m more interested in ML algorithms.

Can we find out if there are methods in Machine Learning/Deep Learning landscape to handle this?


Solution

  • There is a full family of deep learning architectures to work with time series.

    They process a sequence of data, every time they make a prediction and have a kind of internal memory to remind what is important about the past.

    These neural networks are called Recurrent Neural Networks (RNNs). The most successful RNN is called Long Short Term Memory Netowkrs (LSTMs).

    Here you can find code with keras: https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/