This project focuses on predicting loan approval status using machine learning techniques. The dataset contains various features related to loan applicants, and the goal is to classify whether a loan will be approved or not.
- The dataset used is
Loan_status.csv
. - It consists of 614 rows and 13 columns.
- Key features include applicant's income, loan amount, credit history, and property area.
- Checked for null values and removed rows with missing data.
- Converted categorical values into numerical values:
- Loan_Status: 'Y' to 1, 'N' to 0
- Dependents: '3+' to 4
- Split the data into features (X) and target (Y).
- Defined categorical and numerical columns for preprocessing.
- Used
StandardScaler
for numerical feature scaling. - Applied
OneHotEncoder
for categorical feature encoding. - Built an SVM model with a linear kernel.
- Created a pipeline for data preprocessing and model training.
- Training Accuracy: 81.02%
- Testing Accuracy: 79.17%
- The trained model is saved as
loan_status_model.pkl
using thepickle
module.
- pandas
- numpy
- matplotlib
- seaborn
- scikit-learn
- pickle
- Load the trained model from
loan_status_model.pkl
. - Provide applicant data for prediction.
- Get loan approval status (1 for approved, 0 for not approved).
This loan status prediction model can help financial institutions automate loan approval decisions based on applicant details, improving efficiency and accuracy.