Skip to main content

MACHINE LEARNING | LOAN PREDICTION WEB APPLICATION

ARE YOU GETTING THE LOAN?

In this post we are going to discuss the application of machine learning in the financial organization.

Are you getting the loan is a machine learning web app to predict whether the loan will be approved or not based on the details provided by customers? This web app is build using streamlit. Streamlit is a popular open-source framework used for model deployment by machine learning and data science teams. And the best part is it’s free of cost and purely in python.

Understanding the problem statement

"Automate the loan eligibility process based on customer details provided while filling online application form".

The machine learning model for this particular web application is build using the loan dataset available in Kaggle. We will not go deeper into the model building and training part as these steps are already discussed in our previous articles.

Loan Prediction App

For this particular web app, we have six variables. These are Gender, Martial Status, ApplicantIncome, LoanAmount, Credit_History, Property_Area and stored them in variable x. Loan_Status is our output, stored in variable y. first thing we need to do is convert the categorical variables into numerical variables. Some of our input variables are categorical example Gender, are you Married, Property_Area, Credit_History. the code for this conversion is shown below.

Machine learning loan prediction python program


At the front-end side of this app it will ask applicant for these six input variables. Gender and Martial Status can be selected using radio buttons. Applicant has to enter his monthly income and amount of loan applying for. Then he needs to select his property area among Rural, Urban, Semiurban and also need to select Credit History (Unclear Debts or No Unclear Depts). After filling all the details applicant needs to click the predict button.

Two most important factors for this app are Amount of loan and Income of Applicant.

Hypothesis:

  • Higher the amount of loan, the lesser will be the chances of loan approval and vice versa.
  • A higher income will lead to higher probability of loan approval.

· 

If the customer satisfies the required hypothesis the loan will get approved or else it will be rejected. This is shown below the predict button. 

Predicted loan status using machine learning







Comments

Popular posts from this blog

Salary Prediction Web App using Streamlit

Salary Prediction Web App In this article, we are going to discuss how to predict the salary based on various attributes related to salary  using Random Forest Regression. This study focuses on a system that predicts the salary of a candidate based on candidate’s qualifications, historical data, and work experience. This app uses a machine learning algorithm to give the result. The algorithm used is Random Forest Regression. In this problem, the target variable (or output), y, takes value of salary for a given set of input features (or inputs), X. The dataset contains gender, secondary school percentage, higher secondary school percentage, higher secondary school stream, degree percentage, degree type, work experience and specialization of candidate. Below is the step-by-step Approach: Step 1: Import the necessary modules and read the dataset we are going to use for this analysis. Below is a screenshot of the dataset we used in our analysis. Step 2: Now before moving ...

STREAMLIT MULTIPAGE WEB APPLICATION | AREA CALCULATOR

Multipage Web App So far, we have worked with python streamlit library and we have built machine learning web applications using streamlit. In this blog we will see how to build a multi-page web app using streamlit. Streamlit multipage web app We can create multiple apps and navigate across each of them in a main app using a radio button. First, we have created separate apps for each shape to calculate the area of that particular shape example app1.py, app2.py, app3.py etc. Then we have created a main app and added a navigator using radio buttons. Now we just have to run the main app and navigate through the desired web page. Area Calculator This particular multipage web app we named it as area calculator. We have included introduction page and ten shapes of which we can calculate the area by putting required inputs. We have downloaded the multiapp.py framework from GitHub, as we have a greater number of web pages. Each shape in the navigation bar indicates new web p...