I have created a web app that given a dataset with few information such as date of the transaction, Customer ID and revenue, it can predict the life time of the client over a selected time frame.
The application run on an internal dataset, but any dataset can be uploaded to use it. The application can perform automatically some exploratory analysis, as well.
The expected data are in the form of a dataset with 3 columns: Date, ID, Revenue
An Exploratory Analisys can be performed, clicking on the relevant button, Recency, Frequency and Revenue are evaluated and segmented.
From the Date and ID information, New and Existing customer are detected. Cohort are evaluated base on the Retention Rate. And each customer is assigned to a bucket based on its Recency, Frequency and Revenue. Three final category are created with High-Value, Mid-Value and Low-Value Customer.
The User can insert 3 parameters due to his own requirements: Number of cluster you want to divide the life time, number of months required to train the model and number of months considered for the prediction.
The data are divided in a way that each customer falls into a RFM score based on the training time, High-Mid-Low Value, and life time over the testing time.
XGboost model is used. The feature are the RFM over the training period, and the Target is the lifetime of the same customer on the subsequent testing period.
A score of the accuracy of the model is given and known the Recency, Frequency and Revenue of a custormer, a prediction can be made on demand, filling the fields.
The app will use the entries and the model just trained to perform the prediction.
The application is located at this link: https://life-time-marketing.herokuapp.com/
The code is on my github page: https://github.com/canada87/app_life_time