This project builds a Machine Learning Credit Scoring Model to predict whether a customer is likely to be a good or bad credit risk based on their financial information.
Financial institutions use credit scoring models to help determine whether a loan should be approved or rejected. In this project, multiple machine learning algorithms were implemented and compared to identify the best performing model.
The dataset used is the German Credit Dataset, which contains financial and personal information about loan applicants.
Source: https://raw.githubusercontent.com/selva86/datasets/master/GermanCredit.csv
Some of the features include:
- Credit history
- Loan purpose
- Loan amount
- Savings
- Employment duration
- Installment rate
- Property
- Age
- Housing
- Job type
- Credit risk (target variable)
Three classification algorithms were implemented:
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier
The models were evaluated using the following metrics:
- Accuracy
- Precision
- Recall
- F1 Score
- ROC-AUC Score
The models were compared to determine the best performing algorithm.
| Model | Accuracy |
|---|---|
| Logistic Regression | 0.74 |
| Decision Tree | ~0.75 |
| Random Forest | 0.775 |
The Random Forest model performed the best, achieving approximately 77.5% accuracy and strong recall performance.
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Seaborn
- Jupyter Notebook
CodeAlpha_CreditScoringModel
│
├── credit_scoring_model.ipynb
├── GermanCredit.csv
├── credit_model.pkl
├── README.md
The trained Random Forest model is saved as:
credit_model.pkl
This allows the model to be reused for future predictions without retraining.
Developed as part of the CodeAlpha Machine Learning Internship Program.