Bank
Personal Loan
The analysis behind Bank Personal Loan Dataset
IMPLEMENTED BY
Eslam Elsayed Ahmed Arnous
Mohamed Hassan Mohamed Hassan
We are fresh graduated from Modern University of Information & Technology (MTI) at JUL 2021 We are junior data analysts.
TABLE OF CONTENTS
01
Introduction
02
Data Exploration & Visualization�
03
Feature Selection & �Data Preprocessing
04
Building Model
05
Enhancing Try & Proposed Solution
06
Business Recommendation
INTRODUCTION
01
INTRODUCTION
This Dataset is about a bank (Thera Bank) whose management wants to explore ways of converting its liability customers to personal loan customers.
A campaign that the bank ran in 2018 for liability customers showed a healthy conversion rate of over 9% success. This has encouraged the retail marketing department to devise campaigns with better target marketing to increase the success ratio with a minimal budget.
OUR MAIN OBJECTIVE
Identify the potential customers who have a higher probability of purchasing the loan, which lead us to Increase the success ratio of advertisement campaign while at the same time reduce the cost of the campaign.
PROBLEM
SOLUTION
Among these 5000 customers, only 480 (9.6%) accepted the personal loan that was offered to them in the earlier campaign.
by using a technique called an Oversampling SMOTE and scaled dataset to standardize the independent variables of a dataset within a specific range, and used 6 machine learning models to do that.
DATA EXPLORATION & VISUALIZATION
02
DATA EXPLORATION
Nominal Variables:
ID - Customer ID
ZIP Code - Home Address ZIP code of the customer.
Ordinal Categorical variables:
Family - Number of family member of the customer.
Education - Education level of the customer (from 1-3).
DATA EXPLORATION
Interval Variables:
Age - Customers with probably age of 30-50 will buy personal loans.
Experience - Years of experience of customer has
Income - Annual Income of the customer.
CCAvg - Average spending on credit cards per month.
Mortgage - Value of House Mortgage.
DATA EXPLORATION
Binary Categorical Variable:
CD Account - Does the customer have a certificate of deposit (CD)?
Securities Account - Does the customer have a securities account?
Online - Does the customer use internet banking facilities?
Credit Card - Does the customer use a credit card issued by Universal Bank?
Personal Loan - This indicates that the customer has token loan or not?
DATA EXPLORATION
Describe the data?
Used for calculating some statistical data like percentile,
mean, std and min of the numerical values of the Series or DataFrame.
It analyzes both numeric and object series and also the DataFrame
column sets of mixed data types.
DATA VISUALIZATION
Our target is Personal Loan which classify users into
two classes of client's decision:
�1- Accepted Personal Loan�2- Not Accepted Personal Loan
This figure showing these 5000 customers,
only 480 ( 9.6%) accepted the personal loan
that was offered to them in the campaign.
DATA VISUALIZATION
Observation:
found that the most correlated features
on Personal Loan is:
DATA VISUALIZATION
distribution of some important and effective features using dist plot figures:
DATA VISUALIZATION
relation between some important and effective features using kde plot figures:
DATA VISUALIZATION
This chart showing
demonstrating the proportion of
strength of association between
Personal Loan and values
of Main Characteristics with
pie chart.
The Proportion of Strength of Association
Between Personal Loan and Main Characteristics
Income
CCAvg
Family
CD Account
Education
DATA VISUALIZATION
This figure show the relation between Experience & Income found that the probability of Income at its highest point when the experience years are 20.
DATA VISUALIZATION
This bar chart shows how
much each feature is effected
by personal loan column and
the relation between them.
FEATURE SELECTION & �DATA PREPROCESSING
03
FEATURE SELECTION
Ranking most Important features on dataset by using
Random Forest feature_importances_ and the most
effective feature are:
FEATURE SELECTION
Dropping unwanted features from dataset:
ID, ZIP Code, Personal Loan
Preprocessing (Scaling Data):
Scaled dataset to standardize the independent variables in a specific range.
BUILDING MODELS
04
BUILDING MODELS
Decision Tree (DT)
Support Vector Machine (SVM)
K-Nearest Neighbors (KNN)
Random Forest (RF)
Logistic Regression (LR)
Gaussian Naive Bayes (GNB)
BUILDING MODELS
Showing Models Accuracies:
Found that the best model is Random
Forest with 98% had the following measurements scores:
ENHANCING TRY & PROPOSED SOLUTION
05
FEATURE SELECTION (ENHANCING TRY)
Fig1: Choose most important features and highly correlated ones with each others (Income, Family, CCAvg)
Fig2: Since Age shows a little better correlation with Personal loan we will drop the Experience attribute
(Fig1)
(Fig2)
PROPOSED SOLUTION (RESAMPLING TECHNIQUES)
Since we have imbalanced dataset, the distribution of examples across the known classes is biased or skewed, therefore we have to resample The dataset:
1. Under-sampling the majority class In this algorithm, we end up removing the majority element from the Tomek link, which provides a better decision boundary for a classifier.
2. Over-sampling the minority class In SMOTE (Synthetic Minority
Oversampling Technique)
we synthesize elements for the
minority class, in the vicinity of
already existing elements.
PROPOSED SOLUTION (OVERSAMPLING SMOTE)
How to overcome such an issue?
By duplicating examples from the minority class in the
training dataset prior to fitting a model. (helps avoiding overfitting)
A popular algorithm is SMOTE (Synthetic Minority Over Sampling Technique). Instead of using copies of observations to oversample, SMOTE varies attributes of the observations to create new synthetic samples.
BUILDING MODELS (AFTER ENHANCING)�
Decision Tree (DT)
Support Vector Machine (SVM)
K-Nearest Neighbors (KNN)
Random Forest (RF)
Logistic Regression (LR)
Gaussian Naive Bayes (GNB)
BUILDING MODELS
Showing models accuracies after enhancing try of machine learning models:
After using oversampling SMOTE technique found that the performance measurements (Recall, F1 Score, Precision) increases in each model with less miss classification & balanced classes.
BUSSINESS �RECOMMENDATION
06
BUSINESS RECOMMENDATION
Approaches the bank could make to improve a successful loan application:
Based on the previous analysis of the data, Customers who have income above 100k dollars, CD Account & Securities Account, and family members equal to 3 have more chances of having Personal Loan.
So the following must be done:
1- Restructuring the strategic plan in the Marketing Department and providing support for those whose income is less than 100K.
BUSINESS RECOMMENDATION
2- The marketing department coordinates between all customer service departments until it is confirmed that the set plan will be implemented.
3- The sales department communicates with the customer in several ways which he determines according to the situation and according to the situation of the customer.
PLATFORMS
OUR TEAM
ESLAM
MOHAMED
THANKS!
We thank Mr. Gautier Marti, and Abu Dhabi Machine Learning for giving us such an opportunity to be part of this Meetup, and thanks to everyone has joined us