TechieYan Technologies

How likely a person is about to make Bank Turnover, Estimating it using Artificial Neural Network.

Abstract

Based on past data of how a customer is doing his/her transactions we analyze whether the customer will stay with our bank’s plans or move to some other bank. This is done by first cleaning dataset, visualizations of how data is related and then train test split to help train the network. This model helps us tell with new inputs whether the customer would stay or leave the current bank.

This is a classification task wherein we predict if the customer will stay with us or move to some other organization to use their services. To achieve this, we train the ANN on the training dataset, perform required transformations and go with training. At the end of 10 epochs (going through training data 10 times). Epoch could be termed like a revision, the number of times our model will go through the whole training data for training and adjusting the weights to get the best possible accuracy. We get 81% accuracy on the dataset which is okay.

 

Algorithm Description

ANN is a neural network which tries to perform tasks like a human does, think like a human brain. Just like a human brain understands things after learning by watching things or by experience, ANN does the same as well. It learns with experience of going through the dataset multiple times and understands the relations, hidden features and parameters. ANN is helpful in doing regression, classification tasks and performs extremely well on huge datasets achieving high accuracy.

Input Layer:

Whatever input you pass for the model to learn goes through this layer of neural network for performing calculations.

Hidden Layer:

The layer as the name suggests hidden because when we see the real time application we only focus on the input and output, we do not focus on how things happen. Hidden layer performs calculations, does processing, understands the hidden features and updates weights to get the best possible accuracy.

Output Layer:

The input passes through hidden layer where processing happens and output is returned.

For detailed explanation of ANN, refer to this blog https://ai.plainenglish.io/artificial-neural-network-ann-edec89ce4daa .

 

How to Execute?

So, before execution we have some pre-requisites that we need to download or install i.e., anaconda environment, python and a code editor. Anaconda: Anaconda is like a package of libraries and offers a great deal of information which allows a data engineer to create multiple environments and install required libraries easy and neat.

If you are just starting and want to know how to install anaconda refer to this link

If you already have anaconda and want to check on how to create anaconda environment, set up jupyter notebook refer to this article. You can skip the article if you have knowledge of installing anaconda, setting up environment and installing requirements.txt

1. Install necessary libraries from requirements.txt file provided.

 

Picture7

2. Go to the directory where your requirement.txt file is present.

           E.g.  cd D:\bhavani drive\P\deep-learning-keras-tf-tutorial-master\11_chrun_prediction\bank_turnover

Picture8

 3. Run command pip install -r requirements.txt or conda install requirements.txt (Requirements.txt is a text file consisting of all the necessary libraries required for executing this python file. If it gives any error while installing libraries, you might need to install them individually.)

 

Picture9

All the required files will be downloaded after you run it. I got requirement already satisfied as I already have them installed.

To run the code, start jupyter notebook

Picture10
Picture11

When you run the BankTurnoverPrediction.ipynb file, you get the appropriate results.

Picture12

We go through the dataset, do visualizations to help us understand the data, how they are organized, related to each other.

Picture13

Code to create our neural network and train model on data

Picture14

Accuracy of 81% for the dataset

Issues you may face while executing the code

  1. Make sure to change the path in the code. Give full path of dataset/csv file you want to use.
  2. Make sure you have the appropriate versions of tensorflow and keras.
+91 7075575787