An application for prediction loan eligibility for applicants based on their personal, financial, and property-related information.
The Loan Eligibility Predictor is a tool built to assist banks and financial institutions in determining whether an applicant qualifies for a loan. Trained on a Random Forest Classifier, which is then deployed as a web application using Streamlit. The app allows users to input their details and receive instant feedback on their loan eligibility, along with a confidence score indicating the model's certainty.
- Predicts loan eligibility in real-time.
- Provides a confidence score for each prediction.
- User-friendly interface powered by Streamlit.
- Support for both neural network and random forest classifier models.
LoanEligibilityPredictor/
├── assets/ # Contains images and other assets
├── dataset/ # Contains the dataset files
├── app.py # Streamlit web application
├── eda.ipynb # Exploratory Data Analysis notebook
├── LoanerNN.ipynb # Neural Network model notebook
├── LoanerRFC.ipynb # Random Forest Classifier notebook
├── nn.py # Neural Network model script
├── utils.py # Utility functions
├── requirements.txt # Python dependencies
├── environment.yml # Conda environment configuration
├── README.md # Project documentation
└── LICENSE # License informationYou can install and run this application using either pip or conda.
-
Clone the Repository:
git clone https://github.com/SamarthPyati/LoanEligibilityPredictor.git cd loan-eligibility-predictor -
Set Up a Virtual Environment (Optional but Recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Clone the Repository:
git clone https://github.com/SamarthPyati/LoanEligibilityPredictor.git cd loan-eligibility-predictor -
Create and Activate a New Conda Environment:
conda env create -f environment.yml conda activate loan-predictor
-
Alternative: Manual Conda Setup (if environment.yml is not working):
conda create -n loan-predictor conda activate loan-predictor pip install -r requirements.txt
-
Run the Streamlit App:
streamlit run app.py
-
Enter Applicant Information: Fill in the required fields with the applicant's details.
-
Get Prediction: Click the "Predict" button to receive the loan eligibility prediction.
# Run the training notebook
jupyter notebook LoanerRFC.ipynbAlternatively, for the Neural Network model:
# Run the training notebook
jupyter notebook LoanerNN.ipynbThese notebooks will guide you through the training process, including data preprocessing, model training, and evaluation.
Testing is integrated within the training notebooks. After training, the notebooks include evaluation metrics such as accuracy, precision, recall, and ROC-AUC scores to assess model performance.
To launch the Streamlit web application for real-time loan eligibility predictions:
streamlit run app.pyThis will open a web interface where you can input applicant details and receive eligibility predictions.
app.py: Main Streamlit application script that provides a web interface for users to input data and receive predictions.eda.ipynb: Notebook for Exploratory Data Analysis, including data visualization and initial insights.LoanerRFC.ipynb: Notebook detailing the training process using the Random Forest Classifier.LoanerNN.ipynb: Notebook detailing the training process using a Neural Network model.nn.py: Python script containing the implementation of the Neural Network model.utils.py: Contains utility functions used across the project, such as data preprocessing functions.requirements.txt: Lists all Python dependencies required to run the project.environment.yml: Conda environment configuration file listing dependencies and environment settings.assets/: Directory containing images and other assets used in the project.dataset/: Directory containing the dataset files used for training and testing.
This project is licensed under the MIT License. See the LICENSE file for details.

