An end-to-end machine learning project on the UCI Credit Card Default dataset, covering data preprocessing, exploratory data analysis (EDA), feature analysis, classification model development, hyperparameter tuning, ensemble methods, and model evaluation.
Dataset: Default of Credit Card Clients (UCI Repository)
This project aims to predict whether a credit card customer will default on the next month's payment using demographic information, payment history, bill statements, and previous payment records. Multiple machine learning models are developed, tuned, and evaluated to identify the best-performing approach for this binary classification problem.
- Dataset Name: Default of Credit Card Clients
- Source: UCI Machine Learning Repository
- https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients
The dataset contains demographic information, payment history, bill statements, previous payment amounts, and the target variable indicating whether the client defaulted on payment the next month.
- Total Records: 30,000
- Total Features: 25 (including the target variable)
- Problem Type: Binary Classification
The objective is to predict whether a customer will default on their credit card payment in the next month.
Target Variable:
-
default payment next month
- 0 → No Default
- 1 → Default
- Python
- Google Colab / Jupyter Notebook
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
- TensorFlow / Keras
Credit_Card_Default_Prediction/
│
├── Credit_Default_Prediction.ipynb
├── default of credit card clients.xls
├── README.md
| Feature | Description |
|---|---|
| ID | Unique customer identifier |
| LIMIT_BAL | Amount of credit limit granted (NT dollars) |
| SEX | Gender (1 = Male, 2 = Female) |
| EDUCATION | Education level |
| MARRIAGE | Marital status |
| AGE | Customer age |
These variables represent the customer's repayment status during the previous six months.
| Feature | Description |
|---|---|
| PAY_0 | Repayment status in September |
| PAY_2 | Repayment status in August |
| PAY_3 | Repayment status in July |
| PAY_4 | Repayment status in June |
| PAY_5 | Repayment status in May |
| PAY_6 | Repayment status in April |
Repayment Status Codes:
- -2 = No consumption
- -1 = Paid in full
- 0 = Paid on time
- 1 = Payment delay for one month
- 2–8 = Delay for multiple months
Outstanding bill amount for the previous six months.
- BILL_AMT1
- BILL_AMT2
- BILL_AMT3
- BILL_AMT4
- BILL_AMT5
- BILL_AMT6
Amount paid by the customer during the previous six months.
- PAY_AMT1
- PAY_AMT2
- PAY_AMT3
- PAY_AMT4
- PAY_AMT5
- PAY_AMT6
| Value | Meaning |
|---|---|
| 0 | Customer did not default |
| 1 | Customer defaulted |
The following preprocessing steps were performed before model training.
- Data loading
- Exploratory Data Analysis (EDA)
- Data cleaning
- Missing value verification
- Duplicate removal
- Dropping the ID column
- Outlier analysis
- Correlation analysis
- Train-test split
- Mutual Information Feature Analysis
- Feature scaling
Each team member independently implemented one baseline classification model:
- Logistic Regression
- Decision Tree
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
For each model, the following workflow was performed:
- Baseline model training
- K-Fold / Stratified K-Fold Cross-Validation
- Hyperparameter tuning using GridSearchCV and RandomizedSearchCV
- Suitable ensemble learning techniques (Bagging, AdaBoost) where applicable
- Performance evaluation using classification metrics
The best-performing variant of each model was then compared to identify the overall best traditional machine learning approach.
Each team member independently developed an Artificial Neural Network (ANN) model on their respective Git branches. The best-performing ANN architecture was selected and merged into the main project branch for the final comparison with the traditional machine learning models.
The performance of all traditional machine learning models and the final ANN model was evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- Confusion Matrix
- Cross-Validation Score
The best-performing version of each model was compared to determine the overall most effective approach for credit card default prediction.
Load Dataset
│
▼
Initial Exploratory Data Analysis
│
▼
Data Cleaning
│
▼
Feature Analysis
│
▼
Train-Test Split
│
▼
Feature Scaling
│
▼
Baseline Model Training
│
▼
Cross Validation
│
▼
Hyperparameter Tuning
│
▼
Ensemble Learning
│
▼
ANN Implementation
│
▼
Final Model Comparison
- Clone or download this repository.
- Open
Credit_Default_Prediction.ipynbin Google Colab. - Upload the dataset (
default of credit card clients.xls) to the Colab session. - Run the notebook from the first cell to the last.
Note: Google Colab includes all the required libraries (Pandas, NumPy, Matplotlib, Seaborn, Scikit-learn, TensorFlow/Keras, and OpenPyXL) by default.
Clone the repository:
git clone https://github.com/your-username/Credit_Default_Prediction.git
cd Credit_Default_PredictionInstall the required dependencies:
pip install pandas numpy matplotlib seaborn scikit-learn tensorflow openpyxlLaunch Jupyter Notebook:
jupyter notebookOpen Credit_Default_Prediction.ipynb and run all the cells.
| Team Member | Contribution |
|---|---|
| Gokul V S | Performed dataset understanding, initial Exploratory Data Analysis (EDA) and Data Cleaning. Implemented the K-Nearest Neighbors (KNN) classifier, performed cross-validation, hyperparameter tuning (GridSearchCV and RandomizedSearchCV), applied suitable ensemble techniques, and participated in final model comparison. |
| Devadeth B | Executed Outlier Analysis, Bivariate Analysis, and visualization. Implemented the Decision Tree classifier, performed cross-validation, hyperparameter tuning, applied suitable ensemble techniques, developed the project's final Artificial Neural Network (ANN) model, and participated in final model comparison. |
| Kanchana Krishna | Applied Correlation analysis, Mutual Information feature selection, and feature analysis. Implemented the Logistic Regression classifier, performed cross-validation, hyperparameter tuning, applied suitable ensemble techniques, and participated in final model comparison. |
| Rinimol R | Completed Feature preprocessing, Scaling, documentation, and README preparation. Implemented the Support Vector Machine (SVM) classifier, performed cross-validation, hyperparameter tuning, applied suitable ensemble techniques, and participated in final model comparison. |
Build, optimize, and evaluate multiple machine learning models for credit card default prediction, and compare their performance to identify the most effective classification approach.
Yeh, I. C., & Lien, C. H. (2009). The comparisons of data mining techniques for the predictive accuracy of probability of default of credit card clients. Expert Systems with Applications, 36(2), 2473–2480.
Dataset: Default of Credit Card Clients
Source: UCI Machine Learning Repository
https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients
This project is intended for educational and academic purposes.