Final Report
Final Report
ON
Submitted By
Department of Virtualization
School of Computer Science and Engineering
Bidholi, Via Prem Nagar, Dehradun, UK
Jan-May’18
1
CANDIDATE’S DECLARATION
We hereby certify that the project work entitled “ Implementation and analysis of Loan
Approval system using Artificial Intelligence” in partial fulfillment of the requirements for the
award of the Degree of BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE AND
ENGINEERING with specialization in CLOUD COMPUTING AND VIRTUALIZATION
TECHNOLOGY and submitted to the Department of Computer Science & Engineering at Center
for Information Technology, University of Petroleum & Energy Studies, Dehradun, is an authentic
record of our work carried out during a period from January, 2018 to May, 2018 under the
supervision of Mrs. Niharika Singh, Assistant Professor (SS), SoCSE, UPES.
The matter presented in this project has not been submitted by me/ us for the award of any
other degree of this or any other University.
This is to certify that the above statement made by the candidate is correct to the best
of my knowledge.
Project Guide
Dr. Amit Agarwal
Head of the Department <CCVT>
School of Computer Science and Engineering
University of Petroleum & Energy Studies
Dehradun – 248 007 (Uttarakhand)
2
ACKNOWLEDGEMENT
We wish to express our deep gratitude to our guide Mrs. Niharika Singh, for all advice,
encouragement and constant support he has given us throughout our project work. This work
would not have been possible without his support and valuable suggestions.
We sincerely thank to our respected Program Head of the Department, Dr. Amit Agarwal, for his
great support in doing our project in Area (like Network, Big data etc.) at CIT.
We are also grateful to Dr. Manish Prateek Director, SoCS and Dr. Kamal Bansal Dean CoES,
UPES for giving us the necessary facilities to carry out our project work successfully.
We would like to thank all our friends for their help and constructive criticism during our project
work. Finally, we have no words to express our sincere gratitude to our parents who have shown
us this world and for every support they have given us.
3
ABSTRACT
Banks are major providers for loans for employees working in different organizations. With the
enhancement in the banking sector, lots of people apply for bank loans but the bank has its limited
assets which it has to grant to limited people only, this can turn hectic and in many case its wiser
to advice human intelligence rather than an automated system, but again it would be very tedious
for humans alone to compute this amount of data. So as per the demand of the situation it would
be highly efficient to let artificial intelligence be utilized. Banking application for loan approval
system project scope is to design an application which can atomize the concept of loan
management. Banks are using more advanced methods to verify user’s information and know
accurate information about user before approving loan. There is loan management software where
users give their details and these systems determines that a client's loan can be granted or not.
Such applications are helping banks and users to provide fast and accurate method for loan
approval. In our Project, we are implementing this is by using artificial intelligence technique i.e.
multi-layer feed-forward neural network with backpropagation learning algorithm. We are
implementing this by mining the data of the previous records of the people to whom the loan was
granted before and on the basis of these records/experiences the neural network will be trained
using the backpropagation algorithm which give the most accurate result. The main objective of
this project is to predict whether assigning the loan to particular person will be safe or not using
Artificial neural network.
4
1. INTRODUCTION
Distribution of the loans is the core business part of almost every bank. The main portion the
bank’s assets directly came from the profit earned from the loans distributed by the banks. The
prime objective in banking environment is to invest their assets in safe hands where it is. Today
many banks/financial companies approve loan after a regress process of verification and validation
but still there is no surety whether the chosen applicant is the deserving right applicant out of all
applicants.
There are many drawbacks of existing systems which require human intelligence for the loan
approval application:
Through this system we can predict whether that particular applicant is safe or not. We are using
artificial neural network as an enabling tool for evaluating credit applications to support loan
decisions. We are implementing the proposed model using a multi-layer feed-forward neural
network with backpropagation learning algorithm. A multilayer neural network is a nonlinear
statistical data modeling tool. It is usually used to model complex relationships between inputs
and outputs, to find patterns in data, or to capture the statistical structure in an unknown joint
probability distribution between observed variables. A neural network has three layers: the input
layer namely, the hidden layer(s) and the output layer. Hidden layers form a processing bridge
between source and destination. The most significant elements in the NN are: The neuron (the
processing element) which has an input or more and only one output and the interconnection
between the processing elements which are represented by weights. There are three basic phases
of NN learning, recalling and testing. The system is trained on historical examples of input and
output variables. The prediction of loan approval is done using appropriate prediction algorithm
and providing the new data set associated with the applicant.
2. PROBLEM STATEMENT
Often banks are challenged by the manual processing of loans, creating spiraling labor costs and
backlogs of files preventing loans from closing on schedule. This translates into loss of business
to competition. For this reason, many Indian banks and financial institutions are now following
the footsteps of their global counterparts in automating their lending processes, covering the entire
loan life cycle – from loan origination through loan application process, risk assessment, decision-
making, monitoring, and management control of approved loans. So we are building an automated
Loan Approval System which will determine the customer chances of getting a loan.
5
3. OBJECTIVES
These are the objectives achieved.
4. METHODOLOGY
Phases involved in our methodology:
1. Business understanding
2. Data collection
3. Data pre-processing
7. Prediction of Loan
1. Business understanding: Even if banks are more flexible towards business loans,
client’s application may be declined. Clients need to prepare themselves before applying
to increase their chances for loan approval. Lenders want detailed information about the
financial history of the business. They can prepare themselves by creating a detailed
business plan with a profit and loss budget and cash flow forecast. Loan approval depends
heavily on how well their business loan proposal is researched and presented. If they are
considered at high risk, their application may be declined despite having a strong business.
2. Data Collection: Every new applicant details filled at the time of application form acts
as a test data set. The data related to the predictors is provided to the network input layer.
After the operation of testing, model predict whether the new applicant is a fit case for
approval of the loan or not based upon the inference it concludes on the basis of the training
data sets.
6
3. Data pre-processing: The noise in the data is removed in this step so as to get better
Prediction result.
Data Preparation: Data preparation is to define and process the mining data to make
it fit specific data mining method. Data preparation is the first important step in the
data pre-processing and plays a decisive role in the entire data mining process.
Data cleaning: Data cleansing is to fill the vacancy value of the data, eliminate the
noise data and correct the inconsistencies data in the data.
Data option: Data option is to select the data arrange and row used in this mining.
Data expression: Data expression is to transform the data after pre-processing into the
form which can be accepted by the data mining algorithm based on neural network.
The data mining based on neural network can only handle numerical data, so the need
is to transform the sign data into numerical data. The simplest method is to establish a
table with one-to-one correspondence between the sign data and the numerical data.
7
In Back propagation algorithm the error is back propagated and respectively the weights are
adjusted in order to reduce the error. The iteration continues until target value with minimum error
is reached. At the beginning of the training process, the connections between the neurons are set
to random weight W Artificial Neural Networks has matured over a past few years. Neural
network provides methodology of solving highly non-linear problems. Inspired by brain as ANN
is interconnection of highly non-linear neuron. The neurons are connected to each other via link.
This network is trained using Back-propagation algorithm which follows quasi newton method.
During the training process, the input and output data from the training data subset are fed into the
network. The difference between training output and actual output values is then calculated and
the it is trained and validated.
6. Testing the neural network: Testing of neural network is done using testing data
set. The inputs are given to the neural network and the output is calculated and checked
against the output value of the data set to verify the working of neural network
7. Prediction: After training and testing the data set, the inputs of the prediction data set is
provided to the neural network and it gives the predicted output.
Techniques:
1. Use Case Diagram
8
2. Flow Chart Diagram
9
3. Sequence Diagram
10
PSEUDO-CODE
variables_pointer->set_name
instances_pointer->split_random_indices();
data_set.scale_inputs_minimum_maximum()
a) neural_network.set(9, 6, 1)
inputs_pointer->set_information(inputs_information);
11
c)Providing the neural network with the outputs -
outputs_pointer->set_information(targets_information);
a) neural_network.construct_scaling_layer();
scaling_layer_pointer->set_statistics(inputs_statistics);
7. Creation of the probabilistic layer for the handling of binary output data -
a) neural_network.get_probabilistic_layer_pointer();
training_strategy.get_quasi_Newton_method_pointer();
12
a) model_selection.set_training_strategy_pointer(&training_strategy);
model_selection.set_order_selection_type(ModelSelection::SIMULATED_ANNEALING);
simulated_annealing_order_pointer>set_maximum_iterations_number(15);
inputs[i] = value
a) if(outputs>=0.5)
output-Yes, Loan can be given\n";
confusion.save("../data/confusion.dat")
13
PROGRAM CODE
#include <iostream>
#include <time.h>
#include "../opennn/opennn.h"
int main(void)
{
try
{
std::cout<<"Gender,Married,Education,Self_Employed,ApplicantIncome,CoapplicantIncome,Lo
anAmount,Loan_Amount_Term,Credit_History,Loan_Status\n\n";
srand((unsigned)time(NULL));
// Global variables
DataSet data_set;
NeuralNetwork neural_network;
LossIndex loss_index;
TrainingStrategy training_strategy;
ModelSelection model_selection;
// Data set
data_set.set_separator("Comma");
data_set.set_data_file_name("../data/loan.dat");
data_set.load_data();
data_set.set_file_type("dat");
// Variables
14
variables_pointer->set_name(0, "Gender");
variables_pointer->set_name(1, "Married");
variables_pointer->set_name(2, "Education");
variables_pointer->set_name(3, "Self_Employed");
variables_pointer->set_name(4, "ApplicantIncome");
variables_pointer->set_name(5, "CoapplicantIncome");
variables_pointer->set_name(6, "LoanAmount");
variables_pointer->set_name(7, "Loan_Amount_Term");
variables_pointer->set_name(8, "Credit_History");
variables_pointer->set_name(9, "Loan_Status");
data_set.print_data_preview();
std::cout<<"\n";
data_set.print_summary();
// Instances
instances_pointer->split_random_indices();
// Neural network
neural_network.set(9, 6, 1);
inputs_pointer->set_information(inputs_information);
outputs_pointer->set_information(targets_information);
neural_network.construct_scaling_layer();
15
scaling_layer_pointer->set_statistics(inputs_statistics);
scaling_layer_pointer->set_scaling_method(ScalingLayer::NoScaling);
neural_network.construct_probabilistic_layer();
ProbabilisticLayer* probabilistic_layer_pointer =
neural_network.get_probabilistic_layer_pointer();
probabilistic_layer_pointer->set_probabilistic_method(ProbabilisticLayer::Probability);
// Loss index
loss_index.set_data_set_pointer(&data_set);
loss_index.set_neural_network_pointer(&neural_network);
// Training strategy
training_strategy.set(&loss_index);
QuasiNewtonMethod* quasi_Newton_method_pointer =
training_strategy.get_quasi_Newton_method_pointer();
quasi_Newton_method_pointer->set_minimum_loss_increase(1.0e-6);
quasi_Newton_method_pointer->set_display(false);
training_strategy.set_display(false);
// Model selection
model_selection.set_training_strategy_pointer(&training_strategy);
model_selection.set_order_selection_type(ModelSelection::SIMULATED_ANNEALING);
SimulatedAnnealingOrder* simulated_annealing_order_pointer =
model_selection.get_simulated_annealing_order_pointer();
simulated_annealing_order_pointer->set_cooling_rate(0.9);
simulated_annealing_order_pointer->set_maximum_iterations_number(15);
16
ModelSelection::ModelSelectionResults model_selection_results =
model_selection.perform_order_selection();
//int a;
Vector<double> inputs(9, 0.0);
Vector<double> outputs(1, 0.0);
//std::cout<<"Enter input values\n";
/*for(int i=0;i<10;i++) {
std::cin>>a;
inputs[i] = a;
}*/
inputs[0] = 1;
inputs[1] = 1;
inputs[2] = 1;
inputs[3] = 0;
inputs[4] = 4583;
inputs[5] = 1508.0;
inputs[6] = 128.0;
inputs[7] = 360.0;
inputs[8] = 1.0;
outputs = neural_network.calculate_outputs(inputs);
if(outputs>=0.5)
std::cout<<"\nYes, Loan can be given\n";
else
std::cout<<"\nNo, Loan cannot be given\n";
return(0);
}
catch(std::exception& e)
{
std::cerr << e.what() << std::endl;
return(1);
}
}
17
OUTPUT SCREENS
18
19
REFERENCES
[1] Amin Hedayati Moghaddama, Moein Hedayati Moghaddam, "Journal of Economics,
Finance and Administrative Science”.
[2] Kumar A'run, Garg Ishan, “Loan Approval Prediction based on Machine Learning
Approach”.
[3] Shorouq Fathi Eletter, Saad Ghaleb Yaseen, “Neuro-Based Artificial Intelligence Model
for Loan Decisions”.
[4] Aboobyda Jafar Hamid,Tarig Mohammed Ahmed, “Developing Prediction Model Of
Loan Risk In Banks Using Data Mining”.
[5] Shorouq Fathi Eletter, Saad Ghaleb Yaseen, “Applying Neural Networks for Loan
Decisions in the Jordanian Commercial Banking System”.
20