https://github.com/loopglitch26/casual-lending
Causal Inference on Loan Approval
https://github.com/loopglitch26/casual-lending
Last synced: 3 months ago
JSON representation
Causal Inference on Loan Approval
- Host: GitHub
- URL: https://github.com/loopglitch26/casual-lending
- Owner: LoopGlitch26
- Created: 2023-08-16T02:18:03.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T03:07:02.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T18:14:35.778Z (over 1 year ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 348 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Casual-Lending
**Project Overview:**
- Exploration and modeling of a loan eligibility dataset to understand factors influencing loan approval.
- Utilizes data preprocessing, feature engineering, and causal inference techniques.
- Python libraries used: NumPy, Pandas, LightGBM, and DoWhy.
**Dataset:**
- Contains loan applicant details, financial data, and loan approval outcomes.
- Features include gender, marital status, education level, credit history, property area, loan amount, etc.
- Target variable: Loan approval status (0 for not approved, 1 for approved).
**Data Preprocessing:**
- Handle missing categorical values by replacing with mode, numerical values with mean.
- Drop irrelevant columns, create 'TotalIncome' by summing 'ApplicantIncome' and 'CoapplicantIncome'.
- Scale 'TotalIncome', 'LoanAmount', and 'Loan_Amount_Term' using MinMaxScaler.
**Feature Engineering:**
- Introduce 'Appreciability' to capture loan appreciation potential based on financial attributes.
- Create 'IncomeComb' to merge 'Education' and 'Self_Employed', indicating stable income source.
**Causal Inference:**
- Construct a causal graph to model variable relationships and potential causal pathways.
- Highlight relationships like 'Credit_History' -> 'Loan_Status', 'Property_Area' -> 'LoanAmount', etc.

**Model Development:**
- Divide dataset into training and test sets.
- Train LightGBM classifier on training data to predict 'Loan_Status'.
- Generate counterfactual samples using the model to observe outcomes under varied attributes.
**Results and Analysis:**
- Gain insights into factors influencing loan approval.
- Causal graph reveals potential causal links between attributes.
- Trained model predicts loan approval probabilities, assess impact of changing features.
**Business Implications:**
- Assist lending institutions in informed loan approval decisions.
- Counterfactual analysis helps understand how outcomes change under different scenarios.

**Conclusion:**
- Successful exploration, preprocessing, and modeling of loan data.
- Causal analysis uncovers attribute relationships.
- Counterfactual insights aid in equitable lending decisions.
- Valuable information for fair and informed lending practices.