Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 

Repository files navigation

๐Ÿฆ Housing Finance Loan Approval Prediction

R Machine Learning Status Accuracy


๐Ÿ“Œ Overview

This project predicts whether a housing loan application will be approved or rejected using Logistic Regression. It leverages financial and demographic data to help financial institutions make data-driven decisions.


๐ŸŽฏ Objectives

  • Analyze housing finance dataset
  • Perform data preprocessing & feature engineering
  • Build Logistic Regression model
  • Evaluate model using accuracy & ROC curve

๐Ÿ“Š Dataset Features

The dataset includes key attributes such as:

  • ๐Ÿ’ฐ Income to Asset Ratio (IAR)
  • ๐Ÿ“‰ Loan to Value Ratio (LTV)
  • ๐Ÿ“Š Fixed Obligation to Income Ratio (FOIR)
  • ๐Ÿข Employer Type
  • ๐Ÿฆ Bank Savings
  • ๐Ÿ’ Marital Status
  • ๐ŸŽฏ Loan Decision (Target Variable)

๐Ÿ› ๏ธ Tools & Technologies

  • Language: R

  • IDE: RStudio

  • Libraries:

    • fastDummies
    • corrplot
    • caTools
    • car
    • ROCR

Dataset

https://1drv.ms/x/c/f483042b9735aab9/IQCcLU9hPxEoSKeUcyso96AtAXgJrAD9s0hlR95DtLMv7L4?e=NLESkm

โš™๏ธ Project Workflow

1๏ธโƒฃ Data Preprocessing

  • Converted categorical variables into numerical format
  • Used label encoding & dummy variables

2๏ธโƒฃ Feature Engineering

  • Correlation analysis to detect relationships & multicollinearity

3๏ธโƒฃ Train-Test Split

  • 70% Training Data
  • 30% Testing Data

4๏ธโƒฃ Model Building

  • Built Logistic Regression using glm() function

5๏ธโƒฃ Model Evaluation

  • Confusion Matrix
  • ROC Curve
  • Accuracy Score

๐Ÿ“ˆ Results

  • โœ… Achieved ~74% accuracy

  • ๐Ÿ“Š Key influencing features:

    • Income to Asset Ratio
    • Loan to Value Ratio
    • FOIR
    • Employer Type
    • Bank Savings

๐Ÿ“ท Visualizations

  • Correlation Matrix

  • image
  • Confusion Matrix

  • image
  • ROC Curve

  • image

๐Ÿš€ How to Run

# Install required libraries
install.packages(c("fastDummies","corrplot","caTools","car","ROCR"))

# Load dataset
data <- read.csv("your_dataset.csv")

# Run model (example)
model <- glm(Decision ~ ., data=data, family=binomial)
summary(model)

๐Ÿ“Œ Key Insights

  • Logistic Regression effectively predicts loan approval decisions
  • Financial ratios play a major role in decision-making
  • Machine learning improves accuracy and reduces manual effort

๐Ÿ”ฎ Future Improvements

  • Use advanced models (Random Forest, XGBoost)
  • Hyperparameter tuning
  • Deploy as a web app (Shiny)
  • Improve accuracy with feature selection

๐Ÿ™Œ Author

Dhathri Narne ๐Ÿ“Š Data Analyst | Machine Learning Enthusiast


โญ If you like this project

Give it a โญ on GitHub!

About

Built a Logistic Regression model in R to predict housing loan approvals using financial and demographic data. Performed data preprocessing, feature engineering, and model evaluation using ROC curve and confusion matrix. Achieved ~74% accuracy, showcasing the effectiveness of ML in loan decision-making.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors