0% found this document useful (0 votes)
165 views28 pages

Ganesh

Loan prediction is an important research area that involves applying machine learning algorithms like logistic regression to analyze patterns in sample data sets. The document discusses using Python to develop a loan prediction system with high accuracy. It summarizes key Python libraries like NumPy and Pandas used in the project for tasks like data loading, manipulation, visualization, and machine learning.

Uploaded by

Srikanth Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
165 views28 pages

Ganesh

Loan prediction is an important research area that involves applying machine learning algorithms like logistic regression to analyze patterns in sample data sets. The document discusses using Python to develop a loan prediction system with high accuracy. It summarizes key Python libraries like NumPy and Pandas used in the project for tasks like data loading, manipulation, visualization, and machine learning.

Uploaded by

Srikanth Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Machine Learning with Python

Chapter 1
INTRODUCTION

Loan prediction is one of the most important and most prominent research areas in the field
of banking and insurance sectors. In the modern environment identifying and analyzing the
patterns of the obtained sample data set plays a vital role in this era. The loan prediction
involves the application of various machine-learning algorithms. There are some prediction
systems in the market using deep learning and so on. However, those are limited with
certain features and cannot assist the users beyond those limits. The loan prediction project
is developed using machine learning algorithms such as logistic regression. The Python
programming language is used for the implementation of the code.

The html pages are developed for deployment of website using Visual Studio code.
The proposed system can deliver high accuracy results and moderate loss for training and
validate data. Finally, the results show the model implemented with high accuracy. Further,
this work can be extended in order to improve the focus where the high accuracy can be
obtained.The data of previous customers of various banks to whom on a set of parameters
loan were approved. Therefore, the machine-learning model is trained on that record to get
accurate results. Our main objective of this research is to predict the safety of loan. To
predict loan safety, the logistic regression algorithm is used. First, the data is cleaned to
avoid the missing values in the data set.

To train our model data set of 1500 cases and 10 numerical and eight categorical
attributes has been taken. To credit a loan to customer various parameters like CIBIL
(Credit History), Business Value, Assets of Customer etc. has been considered. List of
parameters as shown below: Qualification Categorical In Service / Business Owner
Categorical Individual income of Applicant Qualitative Individual income of Co Applicant
(if Any) Qualitative Amount of Loan required Qualitative Term for which loured
Qualitative Credit History of Applicant Qualitative Area of Property.

1.1 Python
Python is an interpreted high-level programming language for general-purpose
programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant whitespace.
Dept. Of ECE, VIT 1 2022-23
Machine Learning with Python

It provides constructs that enable clear programming on both small and large scales. In July
2018, Van Ross-um stepped down as the leader in the language community after 30 years.
Python interpreters are available for many operating systems. C Python, the reference
implementation of Python, is open source software and has a community-based
development model, as do nearly all of Python is other implementations.

The non-profit Python Software Foundation manages Python and C Python. Python
has a simple, easy to learn syntax emphasizes readability hence; it reduces the cost of
program maintenance. In addition, Python supports modules and packages, which
encourages program modularity and code reuse.

1.1.1 Advantages of using Python


The diverse application of the Python language is a result of the combination of features,
which give this language an edge over others. Some of the benefits of programming in
Python includes

1. Presence of Third Party Modules:


The Python Package Index (PPI) contains numerous third-party modules that make Python
capable of interacting with most of the other languages and platforms.

2. Extensive Support Libraries:


Python provides a large standard library, which includes areas like internet protocols, string
operations, web services tools and operating system interfaces. Many high use-
programming tasks have already been scripted into the standard library, which reduces
length of code to be written significantly.

3. Open Source and Community Development:


Python language is developed under an OSI-approved open source license, which makes it
free to use and distribute, including for commercial purposes. Further, the community,
which collaborates for its code through hosting conferences and mailing lists and developed

4. Learning Ease and Support Available:


Python offers excellent readability and uncluttered simple-to-learn syntax, which helps
beginners to utilize this programming language. The code style guidelines, PEP 8, provide

Dept. Of ECE, VIT 2 2022-23


Machine Learning with Python

a set of rules to facilitate the formatting of code. Additionally, the wide base of users and
active developers has resulted in a rich internet resource bank to encourage development
and the continued adoption of the language.

5. User-friendly Data Structures:


Python has built-in list and dictionary data structures, which can be used to construct fast
runtime data structures. Further, Python also provides the option of dynamic high-level
data typing which reduces the length of support code that is needed.

6. Productivity and Speed:


Python has clean object-oriented design, provides enhanced process control capabilities,
and possesses strong integration and text processing capabilities and its own unit -testing
framework, all of which contribute to the increase in its speed and productivity. Python is
considered a viable option for building complex multi-protocol network applications.

1.2 Data science


“Data science” is just about as broad of a term as they come. It may be easiest to describe
what it is by listing its more concrete components:

1. Data exploration & analysis:-


Included here: Pandas; Numpy; Spicy; a helping hand from Python’s
Standard Library.

2. Data visualization:-
A self-explanatory name. Taking data and turning it into something colorful. Included here:
Matplotlib; Seaborne; Data sheet; others.

3. Classical machine learning:-


Conceptually, we could define this as any supervised or unsupervised learning task that is
not deep learning (see below). Sci kit-learn is far-and-away the go-to tool for implementing
classification, regression, clustering, and dimensional reduction, while Stats Models is less
actively developed but still has a number of useful features. Included here: Sci kit-Learn,
Stats Models.

Dept. Of ECE, VIT 3 2022-23


Machine Learning with Python

4. Deep learning: -
This is a subset of machine learning that is seeing a renaissance, and is commonly
implemented with K eras, among other libraries. It has seen monumental improvements
over the last 5 years, such as Alex Net in 2012, which was the first design to incorporate
consecutive convolution layers. Included here: K eras, Tensor Flow, and a whole host of
others.

5. Data storage and big data frameworks:-


Big data is best defined as data that is either literally too large to reside on a single machine,
or cannot be processed in the absence of a distributed environment. The Python bindings
to Apache technologies play heavily here. Apache Spark; Apache Hadoop; HDFS; Desk;

6. Odds and ends:-


Includes subtopics such as natural language processing, and image manipulation with
libraries such as OpenCV

1.3 Practical Implementation of Data Science


Problem Statement: You are given a data set, which comprises of comprehensive statistics
on a range of aspects like distribution & nature of prison institutions, overcrowding in
prisons, type of prison inmates etc. You have to use this data set to perform descriptive
statistics and derive useful insights out of the data. Below are few tasks:

1. Data loading:
Load a datasets “prisoners.csv” using pandas and display the first and last five rows in the
datasets. Then find out the number of columns using describe method in Pandas.

2. Data Manipulation:
Create a new column -“total benefitted”, which is the sum of inmates benefitted through
all modes.

3. Data Visualization:
Create a bar plot with each state name on the x-axis and their total benefitted inmates as
their bar heights.

Dept. Of ECE, VIT 4 2022-23


Machine Learning with Python

1.4 Various Python libraries used in the project


A Python library is also a group of interconnected modules. It contains code bundles that
can be reused in a variety of programs. It simplifies and facilitates Python programming
for programmers.

1.4.1 Numpy
Numpy is the fundamental package for scientific computing with Python. It contains
among other things:
• a powerful N-dimensional array object
• sophisticated (broadcasting) functions
• tools for integrating C/C++ and Fortran code
• Useful linear algebra, Fourier transform, and random number capabilities.

Besides its obvious scientific uses, Numpy can also be used as an efficient multi -
dimensional container of generic data. Arbitrary data-types can be defined. This allows
Numpy to seamlessly and speedily integrate with a wide variety of databases. Numpy is
licensed under the BSD license, enabling reuse with few restrictions. The core functionality
of Numpy is its "ND array", for n-dimensional array, data structure. These arrays are stride
views on memory.

In contrast to Python's built-in list data structure (which, despite the name, is a
dynamic array), these arrays are homogeneously typed: all elements of a single array must
be of the same type. Numpy has built-in support for memory-mapped arrays.

1.4.2 Pandas
Pandas is an open-source, BSD-licensed Python library providing high-performance, and
easy-to-use data structures and data analysis tools for the Python programming language.
Python with Pandas is used in a wide range of fields including academic and commercial
domains including finance, economics, Statistics, analytics, etc. In this tutorial, we will
learn the various features of Python Pandas and how to use them in practice. The name
Pandas is derived from the word Panel Data – an Econometrics from Multidimensional
data. In 2008, developer Wes McKinney started developing pandas when in need of high
Performance, flexible tool for analysis of data. Prior to Pandas, Python was majorly used
for data managing and preparation.

Dept. Of ECE, VIT 5 2022-23


Machine Learning with Python

It had very little contribution towards data analysis. Pandas solved this problem.
Using Pandas, we can accomplish five typical steps in the processing and analysis of data,
regardless of the origin of data — load, prepare, manipulate, model, and analyze. Python
with Pandas is used in a wide range of fields including academic and commercial domains
including finance, economics, Statistics, analytis etc.

Key Features of Pandas


• Fast and efficient Data Frame object with default and customized indexing.
• Data alignment and integrated handling of missing data.
• Reshaping and pivoting of date sets.
• Label-based slicing, indexing and sub setting of large data sets.
• Columns from a data structure can be deleted or inserted.
• Group by data for aggregation and transformations.
• High performance merging and joining of data.
• Time Series functionality.

1.4.3 Matplotlib
Matplotlib is a Python 2D plotting library, which produces publication quality figures in a
variety of hardcopy formats and interactive environments across platforms. Matplotlib can
be used in Python scripts, the Python and I Python shells, the Jupyter notebook, web
application servers, and four graphical user interface toolkits. Matplotlib tries to make easy
things easy and hard things possible. You can generate plots, histograms, power spectra,
bar charts, error charts, scatterplots, etc., with just a few lines of code.

The sample plots and thumbnail gallery for simple plotting examples, the pl ot
module provides a MATLAB-like interface, particularly when combined with Python. For
the power user, you have full control of line styles, font properties, axes properties, etc. via
an object-oriented interface or via a set of functions familiar to MATLAB users.

Dept. Of ECE, VIT 6 2022-23


Machine Learning with Python

Chapter 2
ORGANIZATION PROFILE

TechCiti Software Consulting Private Limited

ABOUT THE ORGANISATION


An overview
TechCiti is a vast comprehensive information technology services and solutions platform
that digitally transforms business operations, enhances customer engagement and
augments operational efficiency for its customers all over the world. TechCiti offers an
integrated portfolio of products, solutions and services. It serves more than 1500 customers
ranging from Fortune 500 companies to emerging start-ups. Techciti Technologies Private
Limited has evolved as one of the leading Managed Service Provider (MSP’s) in APAC
region. While TechCiti Software Consulting Private Limited has evolved in providing a
comprehensive suite of solutions and services ranging from customised software and web
development, software and web application testing. We have achieved key milestones in
expanding our satisfied customer base throughout APAC region.

The teams have a unique blend of functional and operational knowledge, along with
technical expertise and result-oriented management experience ranging from Application
Development to end-to-end IT Implementation projects. Our organisation derives its
strength from its strong leadership team focused on inspiring an environment of
entrepreneurial culture seeped in delivering exceptional value to the customers. The
company network portfolio consists two companies “TechCiti Technologies Private
Limited” and “TechCiti Software Consulting Private Limited “. TechCiti Technologies
Private Limited being the parent company and TechCiti Software Consulting Private
Limited being the deemed subsidiary of TechCiti Technologies Private Limited.

Through a well-defined development, support and quality framework, TechCiti


consults companies on their technology roadmap and implements, supports and maintains
business-critical applications and the underlying infrastructure. The company brings along
in-depth expertise and robust experience in IT Infrastructure Management, Digital

Dept. Of ECE, VIT 7 2022-23


Machine Learning with Python

Experience Management, Digital Networking, Automation solutions, Cloud services,


performance management, Cloud Security Solutions, Global Network Software Solutions,
customised web ,product and application development , technology consulting , web-
publishing and maintenance-services.

Vision of TechCiti
Our vision is to enable people and organizations realize their potential reinventing their
engagement in defining the future using - technology.

Mission of TechCiti
Our mission is to achieve the leading position as a distinguished & absolute end-to-end
information technology infrastructure & service provider. We want to develop with
profitable growth through superior Customer service, Innovation, Quality and
Commitment.

History of the Organisation


TechCiti Technologies Private Limited was incorporated in the year of 2013. The company
network includes two companies “TechCiti Technologies Private Limited” and “TechCiti
Software Consulting Private Limited “. TechCiti Technologies Private Limited being the
parent company and TechCiti Software Consulting Private Limited being the deemed
subsidiary of TechCiti Technologies Private Limited and was incorporated in the year of
2018.

Key achievements and Milestones


2013 – TechCiti started its journey by collaborating with Intel as their technology partners
And resellers

2013 - TechCiti awarded Platinum Partner of Intel

2014 – TechCiti partnered with Adobe, DellEMC (formerly Dell),

2015 – TechCiti awarded Platinum Partner of Intel

2016 - TechCiti awarded Platinum Partner of Intel

2016 - Created PAN India presence by opening branch offices in Chennai, Pune and Delhi

2016 – Started web and application development for clients.

Dept. Of ECE, VIT 8 2022-23


Machine Learning with Python

2017 - Developed its own ERP based software application related to HRMS (Human

Resource Management System). At present, we have more than 1500+ corporate

Subscribers

2017 – Partnered with HPE as Technology Partners


2017 – TechCiti awarded Platinum Partner of Intel

2018 – Developed a Web based ERP application related to Visitor Management System

Named “e- Visitor”. At present, we have more than 1500+ corporate subscribers.

2018 - TechCiti awarded Platinum Partner Intel

2018 - TechCiti Technologies Private Limited established its deemed subsidiary TechCiti

Software Consulting Private Limited.

2018 - TechCiti signed a partnership with Riverbed and has become their sole partners
2019 – We developed an ERP based accounting software.

2019 - TechCiti awarded the platinum partner of Riverbed.

Structure of the organisation


Organizational structure affects organizational action in two ways:
It provides the foundation on which standard operating procedures are determined It
determines the job role of the employees and the key responsibilities, which they have to
take on a regular basis to ensure the smooth functioning of the organisation. A functional
organizational structure is a structure that consists of activities such as coordination,
supervision and task allocation.

The organizational structure determines how the organization performs or operates.


The term organizational structure refers to how the people in an organization are grouped
and to whom they report. One traditional way of organizing people is by function. Some
common functions within an organization include production, marketing, human resources,
and accounting. The Fig: 2.1 below provides the details.

Dept. Of ECE, VIT 9 2022-23


Machine Learning with Python

Fig: 2.1 About the structure of TechCiti.

Our Stages in application Development Cycle are:


Stage 1: Planning

Stage 2: Analysis

Stage 3: Design

Stage 4: Implementation

Stage 5: Testing and Integration

Stage 6: Maintained

Dept. Of ECE, VIT 10 2022-23


Machine Learning with Python

Chapter 3

SYSTEM ANALYSIS
System analysis is “the process of studying a procedure or business to identify its goal and
purposes and creates systems and procedures that will efficiently achieve them”

3.1 Exiting System


Banks, Housing Finance Companies and some NBFC deal in various types of loans like
housing loan, personal loan, business loan etc. in all over the part of countries. These
companies have existence in Rural, Semi Urban and Urban areas. After applying loan by
customer these companies validates the eligibility of customers to get the loan or not. This
paper provides a solution to automate this process by employing machine-learning
algorithm. Therefore, the customer will fill an online loan application form. This form
consist details like Sex, Marital Status, Qualification, Details of Dependents, Annual
Income, Amount of Loan, Credit History of Applicant and others.

To automate this process by using machine-learning algorithm, first the algorithm


will identify those segments of the customers who are eligible to get loan amounts so bank
can focus on these customers. Loan prediction is a very common real-life problem that
every finance company faces in their lending operations. If the loan approval process is
automated, it can save many person-hours and improve the speed of service to the
customers. The increase in customer satisfaction and savings in operational costs are
significant. However, the benefits can only if the bank has a robust model to accurately
predict which customer's loan it should approve and which to reject, in order to minimize
the risk of loan default.

3.2 Proposed System


Prediction of granting the loan to the customers by the bank is the proposed model.
Classification is the target for developing the model and hence using Logistic Regression
with sigmoid function is used for developing the model. Pre-processing is the major area
of the model where it consumes more time and then Exploratory Data Analysis, which is
followed by Feature Engineering and then Model Selection. Feeding the two separate
datasets to the model, and then preceding the model.

Dept. Of ECE, VIT 11 2022-23


Machine Learning with Python

Logistic regression is a type of statistical machine learning technique/algorithm, which


is used to classify the data by considering outcome variables on extreme ends and tries to
make a logarithmic line that distinguishes between them. By this way, prediction can be
made through Logistic Regression.

3.3 System Architecture


A system architecture is the conceptual model that defines the structure, behavior, and more
views of a system. An architecture description is a formal description and representation
of a system, organized in a way that supports reasoning about the structure and behaviors
of the system as shown in Fig: 3.1.

Fig: 3.1 System architecture

3.4 Installing Anaconda Python, and Jupiter Notebook

Anaconda is a package manager, an environment manager, and python distribution that


contains a collection of many open source packages. The Fig: 3.2 shows the web page of
anaconda latest version to download.

Dept. Of ECE, VIT 12 2022-23


Machine Learning with Python

Fig: 3.2 Anaconda website page


Installation steps:
1. Go to the Anaconda Website and choose a python version 3.6 graphical installer.
2. Locate your download and double click it, and click on Next.
3. Read the license agreement and click on I Agree.
4. Click on Next.
5. Note your installation location and then click on Next.
6. Click on Install and further click on Next.
7. You can install Microsoft VSCode if you wish, but it is optional so click on Skip.
8. Click on finish as shown in Fig: 3.3 anaconda successfully installed.

Fig: 3.3 Anaconda successfully installed.

Dept. Of ECE, VIT 13 2022-23


Machine Learning with Python

Steps to Launch Jupyter Notebook:

You are done with the successful installation of Python and Anaconda in our system,
now let us set up Jupyter Notebook.

1. To launch Jupyter Notebook via command line, simply open our Anaconda
Windows Command Prompt. Here, type and run Jupiter Notebook as shown in
Fig: 3.4.

Fig: 3.4 Command line for launching jupyter Notebook

2. A Jupyter Notebook dashboard will open on our default your browser as shown in Fig:
3.5.
3. Here, click on New→ then select Python 3
4. A new python kernel will be opened, and you are ready to write a new program

Fig: 3.5 Python Kernel

Dept. Of ECE, VIT 14 2022-23


Machine Learning with Python

Chapter 4

Implementation of Loan prediction system


The term implementation can refer to how the internet is structured, and Implementation
refers to how an organization’s network resources are organized.

4.1 Machine Learning


Machine learning is a subset of artificial intelligence in the field of computer science that
often uses statistical techniques to give computers the ability to "learn" (i.e., progressively
improve performance on a specific task) with data, without being explicitly programmed.
Machine learning is closely related to (and often overlaps with) computational statistics,
which also focuses on prediction making with computers. It has strong ties to mathematical
optimization, which delivers methods, theory and application domains to the field

Machine learning (ML) is a category of algorithm that allows software applications


to become more accurate in predicting outcomes without being explicitly programmed. The
basic premise of machine learning is to build algorithms that can receive input data and use
statistical analysis to predict an output while updating outputs as new data becomes
available.

4.1.1 Working of Machine Learning

Machine learning algorithms are often categorized as supervised or unsupervised.


Supervised algorithms require a data scientist or data analyst with machine learning skills
to provide both input and desired output, in addition to furnishing feedback about the
accuracy of predictions during algorithm training. Data scientists determine which
variables, or features, the model should analyse and use to develop predictions. Once
training is complete, the algorithm will apply what was learned to new data.

Unsupervised algorithms do not need to be trained with desired outcome data.


Instead, they use an iterative approach called deep learning to review data and arrive at
conclusions. Unsupervised learning algorithms -- also called neural networks -- are used
for more complex processing tasks than supervised learning systems, including image

Dept. Of ECE, VIT 15 2022-23


Machine Learning with Python

recognition, speech-to-text and natural language generation. These neural networks work
by combing through millions of examples of training data and automatically identifying
often-subtle correlations between many variables. Once trained, the algorithm can use its
bank of associations to interpret new data. These algorithms have only become feasible in
the age of big data, as they require massive amounts of training data.

4.2 Advantages of Machine Learning


1 Trends and Patterns Are Identified With Ease:
Machine Learning is adept at reviewing large volumes of data and identifying patterns
and trends that might not be apparent to a human. For instance, a machine-learning
program may successfully pinpoint a causal relationship between two events. This
makes the technology highly effective at data mining, particularly on a continual,
ongoing basis, as would be required for an algorithm.

2 Machine Learning Improves Over Time:


Machine learning technology typically improves efficiency and accuracy over time
Thanks to the ever-increasing amounts of data that are processed. This gives the
algorithm or program more “experience,” which can, in turn, be used to make better
Decisions or predictions. A great example of this improvement over time involves
weather prediction models. Predictions are made by looking at past weather patterns
and events; this data is then used to determine what is most likely to occur in a particular
scenario. The more data you have in your data set, the greater the accuracy of a given
forecast. The same basic concept is also true for algorithms that are used to make
decisions or recommendations.

3 Machine Learning Lets You Adapt Without Human Intervention:


Machine Learning allows for instantaneous adaptation, without the need for human
intervention. An excellent example of this can be found in security and anti -virus
software programs, which leverage machine learning and AI technology to implement
filters and other safeguards in response to new threats. These systems use data science
to identify new threats and trends. Then, the AI technology is used to implement the
appropriate measures for neutralizing or protecting against that threat. Data Science has
eliminated the gap between the time when a new threat is identified and the time when
a response is issued.

Dept. Of ECE, VIT 16 2022-23


Machine Learning with Python

This near immediate response is critical in a niche where bots, viruses, worms,
hackers and other cyber threats can affect thousands or even millions of people in
minutes.

4 Automation:
Machine Learning is a key component in technologies such as predictive analytics and
artificial intelligence. The automated nature of Data Science means it can save time and
money, as developers and analysts are freed up to perform high-level tasks that a
computer simply cannot handle. On the other side, you have a computer running the
show and that is something that is certain to make any developer squirm with
discomfort. For now, technology is imperfect. Still, there are workarounds. For
instance, if you are employing Data Science technology in order to develop an
algorithm, you might program the Data Science interface so it just suggests
improvements or changes that must be implemented by a human.

This workaround adds a human gatekeeper to the equation, thereby eliminating the
potential for problems that can arise when a computer is in charge. After all, an
algorithm update that looks good on paper may not work effectively when it is put
practice.

4.3 System Requirements

System requirements is a statement that identifies the functionality that is needed by a


system in order to satisfy the customer’s requirements

HARDWARE REQUIREMENTS
• System : Pentium IV 2.4 GHz.
• Hard Disk : 40 GB.
• Floppy Drive : 1.44 Mb.
• Monitor : 15 VGA Colour.
• Mouse : Logitech.
• Ram : 512 Mb.

Dept. Of ECE, VIT 17 2022-23


Machine Learning with Python

SOFTWARE REQUIREMENTS SYSTEM


• Operating system : Windows
• Coding Language : Python, Django, Machine Learning
• Data Base : Sqlite3
• Tools :Anaconda Distribution

4.3.1 Software requirements


Software requirements deal with defining software resource requirements and prerequisites
that need to be installed on a computer to provide optimal functioning of an application.
These requirements or prerequisites are generally not included in the software installation
package and need to be installed separately before the software is installed.

Front-End Software Requirement


Interface Design & Development

Web Framework: Django Framework


Django is a free and open source web application framework, written in Python. A Web
framework is a set of components that provide a standard way to develop websites fast and
easily.

Designing: HTML, CSS, Bootstrap

HTML: HTML stands for Hyper Text Markup Language, which is the most widely used
language on Web to develop web pages. Hypertext refers to the way in which Web pages
(HTML documents) are linked together. HTML is a Markup Language, which means you
use HTML to simply "mark-up" a text document with tags that tell a Web browser how to
structure it to display

CSS: CSS is the acronym for "Cascading Style Sheet". CSS handles the look and feel part
of a web page. Using CSS, you can control the color of the text, the style of fonts, the
spacing between paragraphs, how columns are sized and laid out, what background images
or colors are used, layout designs, and variations in display for different devices and screen
sizes as well as a variety of other effects.

Dept. Of ECE, VIT 18 2022-23


Machine Learning with Python

BOOTSTRAP: Bootstrap is the popular HTML, CSS and JavaScript framework for
developing a responsive and mobile friendly website. Bootstrap is used to create responsive
websites.

Back-End Software Requirement


SQLite: SQLite is the most widely deployed SQL database engine in the world.

Django
Django is an open source and web framework present in python, which is developed and
maintain by DSF (Django Software Foundation). Now a days Django widely in used
because of it is more built in functionalities. There are some famous and well -known
companies and apps are using Django for the development of their websites and those
companies and apps are Google, Instagram, Discus, Spotify, You Tube, Pinterest, .It is
used in web development in python.

It support templates and static files that means you can easily render the HTML pages
by putting all the HTML files in the directory called ‘templates’ and similarly you can place
all the files related to styles like CSS and JS will be placed inside the directory called
‘static’. In this project, Django is used for the front-end development. Further Django
provide more features as compared to other frameworks and those features are given below.

• Built in local host server


• Built in administration facility
• High security
• Rapid development
• Outstanding documentation

4.3.2 Hardware Requirements


• Processor – 64 bit
• RAM – 4 GB for development and evaluation.
• Hard disk –40 GB for installation

Dept. Of ECE, VIT 19 2022-23


Machine Learning with Python

4.4 Design Consideration Approach

The tool has been designed using Jupyter (python integrated development environment),
Integrated development environment, big data, Hadoop. The user interacts with the tool
using a GUI.
• The GUI operates in two forms, backend, and Frontend.
• Frontend shows the interface and Tkinter frames, windows, canvas, etc.
• Backend used to execute several queries to extract useful insights.

Operational Concepts and Scenarios:


Operation of the application based on the inputs given by the user:

System Admin Module:


The System admin people can login into our system. He wants to view his profile and if
any new associations if he wants to modify any associations he can delete the associations.

Product Admin Module:


The product Admin can login into the system and check about following:
• Whom they had cast the vote?
• Information about the transfiguration using web scraping.
• Welcoming Message
• Registration and login Portal

4.5 Algorithms Used in MLP


A process or set of rules to be followed in calculations or other problem-solving operations,
especially by computer

4.5.1 Logistic Regression Algorithm


• Logistic regression is one of the most popular Machine Learning algorithms, which
comes under the Supervised Learning technique. It is used for predicting the
categorical dependent variable using a given set of independent variables.

• Logistic regression predicts the output of a categorical dependent variable.


Therefore, the outcome must be a categorical or discrete value. It can be either Yes

Dept. Of ECE, VIT 20 2022-23


Machine Learning with Python

or No, 0 or 1, true or False, etc. but instead of giving the exact value as 0 and 1, it
gives the probabilistic values which lie between 0 and 1 as shown in Fig: 4.1.

• Logistic Regression is much similar to the Linear Regression except that how they
are used. Linear Regression is used for solving Regression problems,
whereas Logistic regression is used for solving the classification problems.

• In Logistic regression, instead of fitting a regression line, we fit an "S" shaped


logistic function, which predicts two maximum values (0 or 1).

• The curve from the logistic function indicates the likelihood of something such as
whether the cells are cancerous or not, a mouse is obese or not based on its weight,
etc. Logistic Regression is a significant machine-learning algorithm because it has
the ability to provide probabilities and classify new data using continuous and
discrete datasets.

• Logistic Regression can be used to classify the observations using different types
of data and can easily determine the most effective variables used for the
classification. The below image is showing the logistic function:

Fig: 4.1 Logistical waveforms

NOTE: Logistic regression uses the concept of predictive modeling as regression,


therefore, it is called logistic regression, but is used to classify samples; Therefore, it falls
under the classification algorithm.

Dept. Of ECE, VIT 21 2022-23


Machine Learning with Python

4.5.2 Decision Tree Algorithm

• Decision Tree is a supervised learning technique that can be used for both
classification and Regression problems, but mostly it is preferred for solving
Classification problems. It is a tree-structured classifier, where internal nodes
represent the features of a dataset, branches represent the decision rules and each
leaf node represents the outcome.
• In a Decision tree, there are two nodes, which are the Decision Node and Leaf
Node. Decision nodes are used to make any decision and have multiple branches,
whereas Leaf nodes are the output of those decisions and do not contain any further
branches as shown in Fig: 4.2.

• The decisions or the test is performed based on features of the given dataset. A
decision tree contain categorical data (YES/NO) as well as numeric data

Fig: 4.2 Decision tree

Dept. Of ECE, VIT 22 2022-23


Machine Learning with Python

Chapter 5
RESULTS AND DISCUSSION
In a design report, the results and discussions may involve an evaluation of the design
or method used. In a feasibility or case study, the results and discussions section would
involve measuring the feasibility or evaluating the success of one or more solutions.

The anaconda prompt is used to create a project using Django tool and with some
commands as shown in Fig: 5.1

Fig: 5.1 Commands for create a project-using anaconda prompt

The index page is used to know the eligibility for a loan and enter the user’s login or register
details as shown in Fig: 5.2

Fig: 5.2 Index Page

Dept. Of ECE, VIT 23 2022-23


Machine Learning with Python

The register page include the personal details of a user and once the provided details are
filled then click on register as shown in Fig: 5.3

Fig: 5.3 Register Page

The login page is used to login the site with username and password then click on login
as shown in Fig: 5.4

Fig: 5.4 Login Page

Dept. Of ECE, VIT 24 2022-23


Machine Learning with Python

The user’s login page needs personal details to check the eligibility for a loan then click
on check status as shown in Fig: 5.5

Fig: 5.5 User login Page

The prediction page says the results of a user’s status weather profile is matched or
does not matched the eligibility criteria as shown in Fig: 5.6

Fig: 5.6 Prediction Loan Result

Dept. Of ECE, VIT 25 2022-23


Machine Learning with Python

CONCLUSION
Loan prediction is one of the most important and most prominent research areas in the field
of banking and insurance sectors. In the modern environment identifying and analyzing the
patterns of the obtained sample dataset plays a vital role in this era. The loan prediction
involves the application of various machine-learning algorithms. There are some prediction
systems in the market using deep learning and so on. However, those are limited with
certain features and cannot assist the users beyond those limits. The loan prediction project
is developed using machine learning algorithms such as logistic regression.

The Python programming language is used for the implementation of the code,
which has been developed in Anaconda prompt, and the html pages are developed for
deployment of website using Visual Studio code. In this project, Logistic Regression
Algorithm and Decision tree (CNN) machine learning algorithm for accurate prediction of
Loan. The proposed system can deliver high accuracy results and moderate loss for training
and validate data. Finally, the results show the model implemented with high accuracy.
Further, this work can be extended in order to improve the focus where the high accuracy
can be obtained.

Dept. Of ECE, VIT 26 2022-23


Machine Learning with Python

REFERENCES
[1] Amado, Agran and Enri Plaza. “Case-based reasoning: Foundational issues,
methodological variations, and system approaches.” AI communications 7.1 (1994):39-59.

[2] Adebayo, Julius, Justin Gilmer, Michael Mulley, Ian Goodfellow, Moritz Hardt and
Been Kim. “Sanity checks for saliency maps.” arid preprint 2018.

[3] Alain, Guillaume, and Yoshie Bagnio. “Understanding intermediate layers using linear
classifier probes.” aria preprint 2016.

[4]Abler, Maximilian, Sebastian Babushkin, Philipp Seeger, Miriam Hägele, Kristof T.


Schütt, Grégoire Montavon, Wojciech Samke, Klaus-Robert Müller, Sven Dähne, and
Pieter-Jan Kindermans. “iNNvestigate neural networks!” J. Mach. Learn. Res. 20, no. 93
2019: 1-8.

[5]Alberto, Túlio C, Johannes V Lochter, and Tiago A Almeida. “Tubespam: comment


spam filtering on YouTube.” In Machine Learning and Applications , Ieee 14th
International Conference on, 138–43, 2015.

[6] Apley, Daniel W., and Jingyu Zhu. “Visualizing the effects of predictor variables in
black box supervised learning models.” Journal of the Royal Statistical Society: Series B
(Statistical Methodology) 82.4, pp: 1059-1086, 2020.

[7] Kumar Arun, Garg Ishan, Kaur Sanmeet, “Loan Approval Prediction based on Machine
Learning Approach‖”, IOSR Journal of Computer Engineering (IOSR-JCE), Vol. 18, Issue
3, pp. 79-81, Ver. I (May-Jun. 2016).

[8] Aboobyda Jafar Hamid and Tarig Mohammed Ahmed, Developing Prediction Model of
Loan Risk in Banks using Data Mining‖, Machine Learning and Applications: An
International Journal (MLAIJ), Vol.3, No.1, pp. 1-9, March 2016.

Dept. Of ECE, VIT 27 2022-23


Machine Learning with Python

[9] S. Vimala, K.C. Sharmili, ―Prediction of Loan Risk using NB and Support Vector
Machine‖, International Conference on Advancements in Computing Technologies
(ICACT 2018), vol. 4, no. 2, pp. 110-113, 2018.

[10] Nikhil Madane, Siddharth Nanda,”Loan Prediction using Decision tree”, Journal of the
Gujrat Research History, Volume 21 Issue 14s, December 2019.

[11] Pidikiti Supriya, Myneedi Pavani, Nagarapu Saisushma, Namburi Vimala Kumari, k
Vikash,“Loan Prediction by using Machine Learning Models”, International Journal of
Engineering and Techniques. Volume5 Issue 2, Mar-Apr 2019

Dept. Of ECE, VIT 28 2022-23

You might also like