Telco Churn

February 28, 2020
The ability to predict which customers will churn is an important competitive advantage for businesses. This ability will allow marketing department to focus their intervention efforts more appropriately. This experiment shows how a machine learning model can be built to predict customer churn for a telco.
#Scenario The company in this experiment is a company selling telecommunication services. We are given historical data that shows account profiles and usage behaviors. The data also includes a column that captures whether an account churned or not.<br><br> The task is to build a machine learning model that will learn from the given historical data and be able to predict churn when given similar other input data. <br><br> #Dataset <br> The data set is downloaded from Kaggle : Click [Here][1] <br><br> ![][2] <br><br> ![][3]<br><br> As shown in the above table, there are two clusters of inputs - account profiles such as "State", "Account Length", "International Plan" etc.. <br><br> The second clusters are usage behaviors such as amount of call time during the day, during evening and during the night, amount of international calls as well as number of service calls.<br><br> The last column is a boolean value that shows whether the account churned or not. This will serve as the label for the model to learn. <br><br> #Content<br><br> ![][4]<br><br> Model Flow : <br> 1. Data is ingested. Some columns are set as categorical values.<br> 2. Data is split into train/test set<br> 3. SMOTE is needed because the percentage of Churned customer is 86% in the dataset. This is highly skewed. SMOTE stands for Synthetic Minority Over-sampling Technique. SMOTE makes the label less skewed.<br> 4. A two-class boosted decision tree is used<br> 5. A Tune Model Hyperparameter module is used to find an optimal set of hyperparameters <br><br> #Outcome ![][5]<br> The accuracy of the model based on test set is 0.956. That is quite good. However for customer churn, Recall is probably a more important metric. The reason is the cost of customer acquisition is normally quite high. Hence, the key objective of such model is to prevent customers from churning. Therefore the model should be optimized for Recall. In this case the recall is 0.77. It's not bad but it is likely possible to further improve it with further feature engineering, which is not the scope of this experiment. <br><br> #Deployment The easiest way to deploy the model is by using the Excel API. The documentation for the Excel API can be found here https://docs.microsoft.com/en-us/azure/machine-learning/studio/consuming-from-excel Alternatively, you may refer to this [video tutorial as an example][6] [1]: https://www.kaggle.com/mnassrib/telecom-churn-datasets#churn-bigml-80.csv [2]: https://user-images.githubusercontent.com/7254404/75541120-52250080-5a58-11ea-9279-7bd8be1c95ed.png [3]: https://user-images.githubusercontent.com/7254404/75541134-55b88780-5a58-11ea-9778-2e23fbc37f06.png [4]: https://user-images.githubusercontent.com/7254404/75541145-5a7d3b80-5a58-11ea-87a9-f9f206ce4608.png [5]:https://user-images.githubusercontent.com/7254404/75541150-5cdf9580-5a58-11ea-8b7c-8eb1b62cf13c.png [6]: https://www.youtube.com/watch?v=gA_N_gWnNso&list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ&index=5&t=0s