1 of 17

TARGETING THE RIGHT CUSTOMERS FOR EFFECTIVE TELE-MARKETING USING CLASSIFICATION ALGORITHMS TO INCREASE REVENUE

1

2 of 17

PROBLEM DEFINITION

Business Problem

  • There has been a revenue decline for the Portuguese bank and they would like to know what actions to take. After investigation, they found out that the root cause is that their clients are not depositing as frequently as before. Knowing that term deposits allow banks to hold onto a deposit for a specific amount of time, so banks can invest in higher gain financial products to make a profit. In addition, banks also hold better chance to persuade term deposit clients into buying other products such as funds or insurance to further increase their revenues. As a result, the Portuguese bank would like to identify existing clients that have higher chance to subscribe for a term deposit and focus marketing effort on such clients.

Importance of the Problem

In Banking sector, marketing is the backbone to sell its product or service. Banking advertising and marketing is mostly based on an intensive knowledge of objective information about the market and the actual client needs for the bank to run in profitable state. Making right decisions in organizational operations are sometimes proved a great challenge where the quality of decision really matters.

Domain study

A time deposit or term deposit is a deposit in a financial institution with a specific maturity date or a period to maturity, commonly referred to as its “term”. Time deposits differ from at call deposits, such as savings or checking accounts, which can be withdrawn at any time, without any notice or penalty. In Term Deposits, the sum of money is kept for a fixed maturity and the depositor is not allowed to withdraw this sum till the end of the maturity period. That is why they are called as Term Deposits because they are kept up to a particular term. Interest Rates of Portuguese Banks : 0.05 - 1.22 % p.a.

Benefits to the Bank:

• Since the deposits stay in the Bank for a fixed time period, banks can use them to better manage their capital ratios through effective tracking of their Assets & liability , invest in new products, expand and gain more customers.

• Banks collects penalty from those who withdraw their Term deposit before the maturity period.

Benefits to the Customers:

Main reason why Customers turn in for Term deposits is that they offer higher interest rates than traditional liquid savings accounts, whereby customers can withdraw their money at any time.

Value additions planned for the Project

  • Key insights about the Customers
  • Relationship between various attributes of data
  • Significant attributes and its inferences contributing to the actual problem
  • Explain the final model in client specific manner.

2

3 of 17

DATA FINDINGS AND IMPLICATIONS

Suggested Solution:

  • For this problem, the customers who will subscribe for a term deposit needs to be picked out and targeted in order to focus on those customers to increase the bank’s revenue.
  • To resolve the problem, we used Machine Learning Classification algorithms to predict which clients are more likely to subscribe for term deposits.

Data set Considered:

  • Bank Marketing Data - https://www.kaggle.com/dhirajnirne/bank-marketing

Data Pre-processing:

Shape of Data:

  • The shape of the data which indicates that 45211 rows and 23 columns.

Data Description:

  • Data set columns are shown divided into numerical and categorical columns. Our Target Variable is Categorical with Binary Class.

Null Values Detection:

  • Primarily , we didn’t encounter any null values. But, after some data understanding we noticed that there are some unknown values present in

columns like Job, Education, Contact, P-outcome.

3

4 of 17

EXPLORATORY DATA ANALYSIS

4

Categorical Features with Target Column:

  • From this Categorical columns plotted with Target column, we can observe that the ‘1’ (i.e.) ‘yes’ count is very less.

  • This states about the imbalance in the data

Numerical Features with Target Column:

  • From this Numerical columns plotted with Target column , we can observe the distribution of each variable with respect to each class of the target column.

  • From this plot, we can state that ‘previous’, ’p-days’, ’campaign’, ’duration’ and ‘balance’ columns are heavily skewed on the positive side.

5 of 17

5

EXPLORATORY DATA ANALYSIS

6 of 17

6

EXPLORATORY DATA ANALYSIS

Inferences:

  • Age & Age group are related with each other (corr= 0.96) – High Multicollinearity
  • Pdays & Previous are related with each other (corr= 0.45)
  • Duration has positive relation with Response (corr=0.40)

7 of 17

DATA FINDINGS AND IMPLICATIONS

Unknown Values Treatment:

  • As we have unknown values in the education and job columns, based on each category the unknown values

have been imputed.

  • Contact column has unknown values and those unknown values are imputed with mode.

Removing Insignificant Features:

  • As we have education and marital as a different columns we can remove marital-education column.
  • As we have age group column we can remove age column.
  • As we have y column with yes and no we can remove response column.
  • P-outcome column has null values more than 80% we can remove that column.

Outliers Detection:

  • Outliers where found in the features such as previous, balance,campaign,duration.
  • These Outliers have to be treated . Here, we used IQR method for the outlier treatment.

Imbalanced Data:

  • The Target class variable of the dataset is heavily imbalanced. This is the cause for poor performance with

traditional machine learning models and evaluation metrics that assume a balanced class distribution.

  • We used SMOTE – Oversampling Technique with sampling strategy 0.5 to overcome this issue.

7

Before: 85:15

After: 65:35

8 of 17

FEATURE EVALUATION

Feature Engineering:

  • It is the process of using domain knowledge of the data to create new features that make the machine learning

model perform better.

  • Feature engineering is the essential art in machine learning, which creates a massive difference between a good

model and a bad model.

Statistical Test for Significance:

  • The Chi-square test of independence was used to determine whether the independent categorical variables are

related to target or not.

INFERENCE: (Pval <0.05, Fail to accept H0 ), All columns are significant & have relation with target

  • Two sample T-test was used to determine whether the independent numerical variables are

related to target or not.

INFERENCE: (Pval <0.05, Fail to accept H0 ), All columns are significant & have relation with target

Note: Significance value of 0.05 is considered for Statistical testing.

Multicollinearity Check:

  • To check whether multi-collinearity is present or not we have used VIF and we have found that all the columns

are significant features except age (>5 VIF).

Encoding:

  • We used One hot encoding for Linear models and Label encoding for non-linear models

Splitting and Scaling:

  • The train-test split is a technique for evaluating the performance of a machine learning algorithm. Train Dataset: Used to fit the machine learning model, Test Dataset: Used to evaluate the fit machine learning model. Train test split has been done with the test size of 30%.
  • In many machine learning algorithms, to bring all features in the same standing, we need to do scaling so that one significant number doesn’t impact the model just because of their large magnitude.We have done Standard scaler for the data.

8

9 of 17

ALGORITHMS USED

Learning a Function:

  • Machine learning can be summarized as learning a function (f) that maps input variables (X) to output variables (Y). Y = f(x)
  • An algorithm learns this target mapping function from training data. The form of the function is unknown, so our job as machine learning practitioners is to evaluate different machine learning algorithms and see which is better at approximating the underlying function.
  • Different algorithms make different assumptions or biases about the form of the function and how it can be learned.

Parametric Machine Learning Algorithms:

  • A learning model that summarizes data with a set of parameters of fixed size (independent of the number of training examples) is called a parametric model. No matter how much data you throw at a parametric model, it won’t change its mind about how many parameters it needs. Assumptions can greatly simplify the learning process, but can also limit what can be learned. Algorithms that simplify the function to a known form are called parametric machine learning algorithms.
  • In our model, we used only Logistic Regression to classify the binary classes.

Nonparametric Machine Learning Algorithms:

  • Algorithms that do not make strong assumptions about the form of the mapping function are called nonparametric machine learning algorithms. By not making assumptions, they are free to learn any functional form from the training data. Nonparametric methods seek to best fit the training data in constructing the mapping function, whilst maintaining some ability to generalize to unseen data. As such, they are able to fit a large number of functional forms.
  • In our model, we used KNN-Classifier, Random-Forest Classifier, AdaBoost Classifier, Gradient-Boosting Classifier, XGB Classifier, Stacking Classifier and Voting Classifier to classify the binary classes.

9

10 of 17

NON_PARAMETRIC MODEL EVALUATIONS

  • An evaluation metric quantifies the performance of a predictive model. This typically involves training a model on a dataset, using the model to make predictions on a holdout dataset not used during training, then comparing the predictions to the expected values in the holdout dataset. Importantly, different evaluation metrics are often required when working with imbalanced classification.
  • For imbalanced classification problems, the majority class is typically referred to as the negative outcome (e.g. such as “no change” or “negative test result“),and the minority class is typically referred to as the positive outcome (e.g. “change” or “positive test result“). Majority Class: Negative outcome, class 0 and Minority Class: Positive outcome, class 1.
  • In our Bank Telemarketing Dataset, we found that it is an imbalanced classification problem, which contains 88.3% - ‘No’ class and 11.7% ‘Yes’ class. Our Aim is to correctly predict the ‘Yes’ class (positive class), which represents whether the customer subscribed to a term deposit.
  • Following Performance measures are to be used for our models to evaluate its performance: Recall [TP/(TP+FN)] – Sensitivity of the model, F1 Weighted and ROC_AUC.
  • Using Cross-Validated score of recall, f1_weighted and roc auc along with bias error and variance error of several models , we can choose the best model which gives higher

Sensitivity (recall score) with low bias and variance error.

Figure 1: Train and Test scores for all the models considered Figure 2: 5-Fold Cross-Validated scores for all the models along with Bias & Variance Errors (%)

10

11 of 17

NON_PARAMETRIC MODEL RESULTS

From these plots, we can find that XGB model’s performance is better when compared to other models.  For XGB model we attain the following cross-validated metrics as:

  • Recall score = 0.88
  • f1_weighted = 0.93
  • Roc auc (%) = 98.07 %
  • Bias error (%) = 1.93 %
  • Variance error (%) = 0.11% 

11

XGB Classifier gives us a better results when compared to others. XGBoost uses decision trees as base learners, combining many weak learners to make a strong learner. As a result it is referred to as an ensemble learning method since it uses the output of many models in the final prediction. There are many advantages of XGBoost, some of them are mentioned below:

  • It is Highly Flexible.
  • It is faster than Gradient Boosting.
  • It supports regularization.
  • It Works well in small to medium dataset.

12 of 17

LOGISTIC REGRESSION MODEL

Logistic Regression Assumptions:

1) Binary logistic regression requires the target / dependent variable to be binary. For a binary regression, the factor level 1 of the dependent variable should represent the desired outcome (such as Success etc..).- In our case it is class 1 - Customer will subscribe the Term Deposit

2) Only the meaningful variables should be included. - We have ensured that there are no unwanted variables selected for model building.

3) The predictor variables should not be correlated to each other (multicollinearity).- After "Age" Column was removed, no Multicollinearity exist

4) Logistic regression requires quite a large number of observations.- A general rule of thumb is that observations must be at least 10 % of variables.

We have 45211 observations and 21 variables, thus satisfying the assumption

Feature Selection:

  1. To obtain the best features , we used Iterative Backward elimination method using Logistic Regression model.

Removed Columns” job_blue-collar “ with Prob =0.62

Model Interpretations:

1) We observed that the McFadden R square (Pseudo R square) is 0.6 and the model fitness is good (Suggested 0~1).

This McFadden approach is one minus the ratio of two log likelihoods. The numerator is the log likelihood of the

logit model selected and the denominator is the log likelihood if the model with just had an intercept (Null model).

2) LLR Pval <0.05, Model is good

H0: No independent var is predictor of y

Ha: Atleast one ind var sis pred of y

Model Explainability:

  1. As Salary increases by 100 Euros, the odds of Customer subscribes the product increases by 124%.
  2. As Balance increases by 100 Euros, the odds of Customer subscribes the product increases by 21%.
  3. As Duration increases by 100 Seconds, the odds of Customer subscribes the product increases by 282%.
  4. As Campaign calls increases by 1 unit, the odds of Customer subscribes the product decreases by 22%.
  5. As Previous calls increases by 1 unit, the odds of Customer subscribes the product decreases by 16%.

12

13 of 17

RECOMMENDATIONS

Recommendations:

Based on the key influencers from Logit model, following recommendations are suggested to enhance our Business motive “Identifying the right Customers and Increase the odds of subscribing our Term Deposit”.

Logit model features = [Salary,Balance,Duration,Campaign,Previous]

  1. As Salary increases by 100 Euros, the odds of Customer subscribes the product increases by 124%. We can focus on Customers with higher pay scales and offer personalized term deposits to them.

  • As Balance increases by 100 Euros, the odds of Customer subscribes the product increases by 21%. We can track stable Customers who maintains good Balance, target them with

Loans and other products.

  1. As Duration increases by 100 Seconds, the odds of Customer subscribes the product increases by 282%. We can hire employees with good communication & marketing skills and

maintain maximum call duration with Customers.

  1. As Campaign calls increases by 1 unit, the odds of Customer subscribes the product decreases by 22%. We can very well infer that, as no of calls increases per Customer, they might

not want to subscribe to our product. Target is to make one call per with more efficiency.

  1. As Previous calls increases by 1 unit, the odds of Customer subscribes the product decreases by 16%. We can very well infer that, as no of calls increases per Customer, they might

not want to subscribe to our product. Target is to make one call per with more efficiency.

13

14 of 17

RECOMMENDATIONS

Recommendations:

Based on the key influencers from XGB model, following recommendations are suggested to enhance our Business motive “Identifying the right Customers and Increase the odds of subscribing our Term Deposit”.

XGB model features = [Salary,Balance,Housing,Duration,pdays,Campaign,Previous,loan]

  • Customers who do not prefer “housing loans” are more likely to subscribe our Term deposit. Thus, we can offer benefitting schemes coupled with housing loans to make them subscribe two of our products.
  • Customers with less “pdays“ (No of days passed after contacted from the previous campaign) will definitely know about the latest Term deposit schemes .Minimising the pdays is essential to make customers subscribe our Term deposit. This can be achieved by frequent reminders for bank marketing employees to call the customers and make them aware of our latest products.
  • Customers who do not prefer any “loans” are more likely to subscribe our Term deposit. We can use customer details, identify their background and then recommend them suitable loans coupled with Term deposit to make them subscribe two of our products.
  • “Eligible” Customers must be focussed and contacted more frequently. More Schemes and products can be developed targeting Eligible customers for maximum benefit.

14

15 of 17

LIMITATIONS OF OUR SOLUTION

  • We have not implemented Step.6 (Deployment). Thus, the model behaviour in real-time production environment is unknown.
  • The Final Model(s) was chosen to be Logistic Regression & Extreme Gradient Boosting Model by considering the explain-ability & all the model performance metrics. Our final Model was tuned with only ‘max-depth’.  
  • This final model was not a generalized model but this was business oriented model that is specifically designed to be used for targeting the customers who would subscribe to the term deposit. This Model will not be used for all the market analysis problems.

15

16 of 17

SCOPE AND CONCLUSION

Future Scope:

  • Probability of customers who takes the term deposit can be increased by deploying this model and this helps banks to cut costs involved in campaigns by focusing only on the potential customers.
  • Banks can invest the saved amount in future campaigns, or can give gift vouchers, coupons to those who invest in term deposit, this will helps to attract the customers.
  • Data of the non potential customers details can be stored for the future applications.

Conclusion:

  • The best models chosen from the previous section are Logistic Regression & XGBOOST. Hence it can be taken into production where a different set of test data will be used and the classification can be performed with the obtained confidence as told by the model’s metrics. 
  • Hence we can expect our model to classify the customers who are about to take the term deposit with the confidence of 77 & 88%.
  • From the analysis, it allows the bank to better anticipate and address the potential customers and improving their strategic marketing in future campaigns.

16

17 of 17

THANK YOU!!!