This project follows a complete end-to-end Data Analytics and Machine Learning pipeline.
Raw LendingClub Dataset (133 Features)
│
▼
Data Understanding (Python)
│
▼
Data Cleaning & Preprocessing
│
▼
Cleaned Dataset (36 Features)
│
┌───────┴────────┐
▼ ▼
SQL Analysis Power BI Dashboard
│ │
└───────┬────────┘
▼
Business Insights & KPI Analysis
│
▼
Machine Learning Model Development
│
▼
Loan Default Prediction & Model Evaluation
LENDINGCLUB
│
├── 1_Dataset
├── 2_Cleaned_real_Data
├── 3_SQL
├── 4_PowerBI
├── 5_Python
├── 6_Machine_Learning
├── 7_Images
├── 8_Documentation
└── README.md
| Category | Technologies Used |
|---|---|
| Programming Language | Python |
| Data Analysis | Pandas, NumPy |
| Data Visualization | Matplotlib, Seaborn |
| Database | MySQL |
| Dashboard | Power BI |
| Machine Learning | Scikit-learn |
| Development Environment | Jupyter Notebook, VS Code |
| Version Control | Git & GitHub |
LendingClub Loan Dataset
The dataset is based on historical LendingClub loan records containing borrower information, loan characteristics, repayment status, and financial attributes.
| Description | Value |
|---|---|
| Original Features | 133 |
| Selected Features | 36 |
| Records | 119,119 |
| Target Variable | loan_status |
- Loan Amount
- Interest Rate
- Annual Income
- Loan Grade
- Sub Grade
- Home Ownership
- Verification Status
- Purpose
- Debt-to-Income Ratio (DTI)
- FICO Score
- Loan Status
- Issue Date
- State
- Term
- Installment
- Total Payment
- Recoveries
The cleaned LendingClub dataset was imported into MySQL for business analysis.
More than 50 SQL queries were written to answer real-world business questions and extract meaningful insights.
- Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)
- GROUP BY & ORDER BY
- WHERE, IN, BETWEEN, AND, OR
- HAVING Clause
- CASE Statements
- Subqueries
- Common Table Expressions (CTEs)
- Window Functions
- ROW_NUMBER()
- RANK()
- DENSE_RANK()
- PARTITION BY
- Business-Oriented SQL Queries
✔ Total Number of Loans
✔ Total Loan Amount Issued
✔ Average Loan Amount
✔ Average Interest Rate
✔ Loan Status Distribution
✔ Loan Amount by Grade
✔ Loan Amount by State
✔ Top Loan Purposes
✔ Loan Trend by Year
✔ Monthly Loan Analysis
✔ Average FICO Score by Year
✔ Risk Category Classification
✔ Above Average Loan Analysis
✔ Top Loans within Each Grade
✔ Running Ranking using Window Functions
The complete SQL script is available in:
3_SQL/LendingClub_SQL.sql
Three interactive dashboards were developed to analyze LendingClub loan performance from different business perspectives.
Key KPIs:
- Total Loans
- Total Loan Amount
- Average Loan Amount
- Average Interest Rate
- Average Annual Income
- Total Interest Received
- Total Principal Received
- Total Recoveries
Visualizations:
- Loan Status Distribution
- Loan Amount Trend
- Monthly Loan Trend
- Loan Amount by Grade
- Top States by Loan Amount
- Loan Amount by Home Ownership
- Top Loan Purposes
Visualizations:
- Principal Recovery Trend
- Interest Received Trend
- Loan Status Trend
- Recoveries by Year
- Top 10 States
- Top Loan Purposes
Visualizations:
- Loan Status by Grade
- Average Interest Rate by Grade
- Average FICO Score by Grade
- Average Debt-to-Income Ratio
- Home Ownership Distribution
- Verification Status Distribution
4_PowerBI/LendingClub_Analytics.pbix
The objective of the Machine Learning phase is to predict whether a loan is likely to be Fully Paid or Charged Off based on borrower and loan characteristics.
- Data Understanding
- Data Cleaning & Preprocessing
- Feature Selection
- Exploratory Data Analysis (EDA)
- Encoding Categorical Variables
- Train-Test Split
- Model Building
- Model Evaluation
- Performance Comparison
loan_status
- Fully Paid → 0
- Charged Off → 1
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier
The models were evaluated using the following performance metrics:
- Accuracy
- Precision
- Recall
- F1-Score
- ROC-AUC Score
Among the implemented models, the Random Forest Classifier achieved the best overall performance for this dataset.
6_Machine_Learning/
│
├── Loan_Default_Prediction.ipynb
| Model | Accuracy | Precision | Recall | F1 Score | ROC-AUC |
|---|---|---|---|---|---|
| Logistic Regression | 79.96% | 52.62% | 3.99% | 7.42% | 51.54% |
| Decision Tree | 72.86% | 33.91% | 36.77% | 35.28% | 59.36% |
| Random Forest | 82.26% | 75.89% | 17.30% | 28.18% | 57.96% |
- Logistic Regression achieved good accuracy but poor recall.
- Decision Tree captured more default cases but with lower overall accuracy.
- Random Forest achieved the highest accuracy and precision among the evaluated models, making it the preferred model for this project.
The analysis of the LendingClub dataset revealed several important business insights:
- Grade B and Grade C loans accounted for a significant portion of the total loan amount.
- Fully Paid loans were considerably higher than Charged Off loans.
- Borrowers with higher interest rates generally exhibited a greater risk of default.
- Loan issuance showed noticeable variation across different years and months.
- Certain loan purposes, such as Debt Consolidation and Credit Card repayment, dominated the portfolio.
- States like California, Texas, and New York contributed the highest loan volumes.
- Annual income and FICO score showed a positive relationship with successful loan repayment.
- Loan grade and interest rate were among the most influential factors affecting loan performance.
git clone https://github.com/<your-username>/LendingClub-Loan-Default-Prediction.gitpip install -r requirements.txt- Run the Python notebook for data preprocessing.
- Import the cleaned dataset into MySQL.
- Execute the SQL queries.
- Open the Power BI dashboard.
- Run the Machine Learning notebook.
The project can be further enhanced by:
- Hyperparameter tuning for machine learning models.
- Testing advanced ensemble algorithms such as XGBoost and LightGBM.
- Deploying the prediction model using Streamlit or Flask.
- Building a real-time loan default prediction dashboard.
- Integrating the project with cloud platforms for deployment.
Rakshitha G
Artificial Intelligence & Machine Learning Undergraduate with a strong interest in Data Analytics, Business Intelligence, Machine Learning, and Data Science.
- Python
- SQL
- Power BI
- Excel
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
- MySQL
I enjoy building end-to-end data analytics projects that transform raw data into meaningful business insights.
This project was developed for learning and portfolio purposes using the LendingClub loan dataset.
The project demonstrates an end-to-end workflow including:
- Data Understanding
- Data Preprocessing
- SQL Business Analysis
- Interactive Power BI Dashboards
- Machine Learning
- Business Insights






