Learn practical skills, build real-world projects, and advance your career

Objective

To Predict the customers who are about to churn from a telecom operator

Business Objective is to predict the High Value Customers only

We need to predict Churn on the basis of Action Period (Churn period data needs to be deleted after labelling)

Churn would be based on Usage

Requirement:

  1. Churn Prediction Model
  2. Best Predictor Variables

Approach

  1. Data Understanding & Cleaning
  2. EDA
  3. Derived Metrics
  4. Dimensionality Reduction using PCA
  5. Classification models to predict Churn (Use various Models & Handle class imbalance)
  6. Model Evaluation
  7. Prepare Model for Predictor variables selection (Prepare multiple models & choose the best one)
  8. Summarize
# Importing the required Librarires

import pandas as pd
import numpy as np
import jovian
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report,confusion_matrix, accuracy_score
from sklearn.datasets import make_classification
from imblearn.metrics import sensitivity_specificity_support
from sklearn.model_selection import KFold
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import roc_auc_score
from sklearn.linear_model import LogisticRegression
from sklearn import metrics
from sklearn.pipeline import Pipeline
import xgboost as xgb
from xgboost import XGBClassifier
from xgboost import plot_importance
import gc
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import classification_report