Skip to content

The model predicts for the next month credit card defaulter based on demographic and last six months behavioral data

Notifications You must be signed in to change notification settings

debmalya92/credit-card-defaulter-prediction

Repository files navigation

Credit Card Defaulter prediction

Table of Content

Demo

Link: https://credit-card-defaulter-predict.herokuapp.com/

Overview

This is a classification model for a most common dataset, Credit Card defaulter prediction. Prediction of the next month credit card defaulter based on demographic and last six months behavioral data of customers.

Motivation

There are times when even a seemingly manageable debt, such as credit cards, goes out of control. Loss of job, medical crisis or business failure are some of the reasons that can impact your finances. In fact, credit card debts are usually the first to get out of hand in such situations due to hefty finance charges (compounded on daily balances) and other penalties.

A lot of us would be able to relate to this scenario. We may have missed credit card payments once or twice because of forgotten due dates or cash flow issues. But what happens when this continues for months? How to predict if a customer will be defaulter in next months?

To reduce the risk of Banks, this model has been developed to predict customer defaulter based on demographic data like gender, age, marital status and behavioral data like last payments, past transactions etc.

Dataset Information

This dataset contains information on default payments, demographic factors, credit data, history of payment, and bill statements of credit card clients in Taiwan from April 2005 to September 2005.

Technical Aspect

This project is divided into two part:

  1. Training a RandomForestClassifier classification model using GridSearchCV to predict defaulter as accurate as possible.
    • Cleaning the datasets, fixing all features
    • Applying all GridSearchCV to obtain optimal hyperparameters
    • Apply Classification ML model
  2. Building and hosting a Flask web app on Heroku.
    • Build the web app using Flask API
    • Upload the project on GitHub
    • Get the customer information from Web app
    • Display the prediction

Installation

The Code is written in Python 3.7. If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, run this command in the project directory after cloning the repository:

pip install -r requirements.txt

Depoyment on Heroku

Create a new repositoryon GitHub and upload the project.

Follow the instruction given on Heroku Documentation to deploy a web app.

Directory Tree

├── templates 
│   └── index.html
├── app.py
├── credit-card-default.csv
├── credit_default_prediction.py
├── model.pkl
├── Procfile
├── README.md
└── requirements.txt

Technologies Used

Team

Debmalya Ghosal
Debmalya Ghosal

Credits

  • The datasets has been provided by Kaggle. The original dataset can be found here at the UCI Machine Learning Repository. This project wouldn't have been possible without this dataset.

About

The model predicts for the next month credit card defaulter based on demographic and last six months behavioral data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published