Skip to content

About

Credit Scoring Model using Machine Learning to predict customer creditworthiness based on financial and demographic data.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

💳 Credit Scoring Model

Python Scikit-Learn Streamlit Machine Learning License

A Machine Learning project developed as part of the CodeAlpha Machine Learning Internship. This project predicts whether a customer is creditworthy based on their financial information using various classification algorithms.


📌 Project Overview

Financial institutions need to assess whether a customer is likely to repay a loan. This project builds a Credit Scoring Model that classifies applicants into Good Credit or Bad Credit categories using machine learning.

The project compares multiple classification algorithms and selects the best-performing model based on evaluation metrics.


🎯 Objectives

  • Predict customer creditworthiness.
  • Compare multiple Machine Learning models.
  • Evaluate models using standard classification metrics.
  • Deploy the best model using a Streamlit web application.

📂 Project Structure

CodeAlpha_CreditScoringModel/
│
├── dataset/
│   └── german_credit_data.csv
│
├── models/
│   ├── model.pkl
│   ├── scaler.pkl
│   └── feature_columns.pkl
│
├── src/
│   ├── config.py
│   ├── preprocessing.py
│   ├── train.py
│   ├── predict.py
│   └── utils.py
│
├── app.py
├── notebook.ipynb
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore

📊 Dataset

Dataset: German Credit Dataset

Target Column

  • Creditability
    • 1 = Good Credit
    • 0 = Bad Credit

Features

  • Account Balance
  • Credit Duration
  • Previous Payment Status
  • Purpose
  • Credit Amount
  • Savings
  • Employment Length
  • Installment Percentage
  • Age
  • Occupation
  • Number of Credits
  • Telephone
  • Foreign Worker
  • and more...

⚙️ Technologies Used

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Matplotlib
  • Streamlit
  • Joblib

🤖 Machine Learning Models

The following models were trained and compared:

  • Logistic Regression
  • Decision Tree
  • Random Forest
  • Gradient Boosting
  • AdaBoost
  • Extra Trees
  • K-Nearest Neighbors (KNN)
  • Support Vector Machine (SVM)
  • Gaussian Naive Bayes

The model with the highest ROC-AUC score is automatically selected and saved.


📈 Evaluation Metrics

The models were evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1-Score
  • ROC-AUC Score
  • Confusion Matrix

🚀 How to Run

1. Clone Repository

git clone https://github.com/simhadris17012005/CodeAlpha_CreditScoringModel.git

cd CodeAlpha_CreditScoringModel

2. Install Dependencies

pip install -r requirements.txt

3. Train the Model

python src/train.py

4. Run Streamlit App

streamlit run app.py

💻 Application

The Streamlit application allows users to:

  • Enter customer details
  • Predict creditworthiness
  • View prediction confidence

📸 Output

Example Prediction:

Prediction : Good Credit

Confidence : 94.81%

📌 Future Improvements

  • Hyperparameter tuning
  • Cross-validation
  • Feature importance visualization
  • SHAP explainability
  • Better Streamlit UI with dropdown menus
  • Cloud deployment

👨‍💻 Author

simhadri

Machine Learning Intern – CodeAlpha


📜 License

This project is licensed under the MIT License.

About

Credit Scoring Model using Machine Learning to predict customer creditworthiness based on financial and demographic data.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages