File size: 7,073 Bytes
78c19a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
---
language:
- en
size_categories:
- 100K<n<1M
task_categories:
- tabular-classification
task_ids:
- multi-class-classification
tags:
- credit-score
- finance
- banking
- tabular
- classification
pretty_name: Credit Score Classification Dataset
---

# 💳 Credit Score Classification Dataset

A comprehensive dataset for predicting customer credit scores into three categories: **Good**, **Standard**, and **Poor**.

## Dataset Description

This dataset contains customer financial information and behavioral patterns used for credit score classification. It includes various features related to credit history, payment behavior, and financial metrics.

### Dataset Summary

| Property | Value |
|----------|-------|
| **Total Samples** | ~100,000+ |
| **Features** | 22 (17 numerical + 5 categorical) |
| **Target Classes** | Good, Standard, Poor |
| **Format** | CSV |
| **Language** | English |

## Dataset Structure

### Data Files

| File | Description | Size |
|------|-------------|------|
| `train.csv` | Training dataset | ~31 MB |
| `test.csv` | Test dataset | ~15 MB |

### Features

#### Numerical Features (17)

| Feature | Description | Data Type |
|---------|-------------|-----------|
| `Age` | Customer's age in years | Integer |
| `Annual_Income` | Yearly income | Float |
| `Monthly_Inhand_Salary` | Monthly take-home salary | Float |
| `Num_Bank_Accounts` | Number of bank accounts owned | Integer |
| `Num_Credit_Card` | Number of credit cards | Integer |
| `Interest_Rate` | Average interest rate on credit | Integer |
| `Num_of_Loan` | Number of active loans | Integer |
| `Delay_from_due_date` | Average payment delay in days | Integer |
| `Num_of_Delayed_Payment` | Count of delayed payments | Integer |
| `Changed_Credit_Limit` | Credit limit change percentage | Float |
| `Num_Credit_Inquiries` | Number of credit inquiries | Integer |
| `Outstanding_Debt` | Total outstanding debt amount | Float |
| `Credit_Utilization_Ratio` | Credit utilization percentage | Float |
| `Credit_History_Age_Months` | Length of credit history in months | Integer |
| `Total_EMI_per_month` | Monthly EMI payments | Float |
| `Amount_invested_monthly` | Monthly investment amount | Float |
| `Monthly_Balance` | Average monthly balance | Float |

#### Categorical Features (5)

| Feature | Description | Categories |
|---------|-------------|------------|
| `Month` | Month of record | January - December |
| `Occupation` | Employment type | Accountant, Architect, Developer, Doctor, Engineer, Entrepreneur, Journalist, Lawyer, Manager, Mechanic, Media_Manager, Musician, Scientist, Teacher, Writer |
| `Credit_Mix` | Types of credit accounts | Bad, Good, Standard |
| `Payment_of_Min_Amount` | Minimum payment behavior | Yes, No, NM |
| `Payment_Behaviour` | Spending patterns | High_spent_Large_value_payments, High_spent_Medium_value_payments, High_spent_Small_value_payments, Low_spent_Large_value_payments, Low_spent_Medium_value_payments, Low_spent_Small_value_payments |

#### Target Variable

| Feature | Description | Classes |
|---------|-------------|---------|
| `Credit_Score` | Credit score classification | Good, Standard, Poor |

## Dataset Statistics

### Class Distribution

| Class | Description |
|-------|-------------|
| **Good** | Customers with excellent credit profiles |
| **Standard** | Customers with average credit profiles |
| **Poor** | Customers with concerning credit profiles |

### Feature Statistics (Approximate)

| Feature | Min | Max | Mean |
|---------|-----|-----|------|
| Age | 14 | 100 | ~35 |
| Annual_Income | 0 | 500,000 | ~50,000 |
| Num_Bank_Accounts | 0 | 20 | ~5 |
| Credit_Utilization_Ratio | 0% | 100% | ~30% |
| Credit_History_Age_Months | 0 | 500 | ~200 |

## Usage

### Loading with Pandas

```python
import pandas as pd

# Load training data
train_df = pd.read_csv('train.csv')
print(f"Training samples: {len(train_df)}")
print(f"Features: {train_df.columns.tolist()}")

# Load test data
test_df = pd.read_csv('test.csv')
print(f"Test samples: {len(test_df)}")
```

### Basic Exploration

```python
# Check class distribution
print(train_df['Credit_Score'].value_counts())

# Check for missing values
print(train_df.isnull().sum())

# Statistical summary
print(train_df.describe())
```

## Data Preprocessing

The following preprocessing steps are recommended:

1. **Handle Missing Values**: Some columns may contain missing or placeholder values
2. **Clean Categorical Data**: Handle special characters in categorical columns
3. **Feature Scaling**: Apply StandardScaler to numerical features
4. **Encoding**: Use OneHotEncoder for categorical features, LabelEncoder for target

### Example Preprocessing

```python
from sklearn.preprocessing import StandardScaler, LabelEncoder, OneHotEncoder
import pandas as pd

# Numerical columns
numerical_cols = ['Age', 'Annual_Income', 'Monthly_Inhand_Salary', 
                  'Num_Bank_Accounts', 'Num_Credit_Card', 'Interest_Rate',
                  'Num_of_Loan', 'Delay_from_due_date', 'Num_of_Delayed_Payment',
                  'Changed_Credit_Limit', 'Num_Credit_Inquiries', 'Outstanding_Debt',
                  'Credit_Utilization_Ratio', 'Credit_History_Age_Months',
                  'Total_EMI_per_month', 'Amount_invested_monthly', 'Monthly_Balance']

# Categorical columns
categorical_cols = ['Month', 'Occupation', 'Credit_Mix', 
                    'Payment_of_Min_Amount', 'Payment_Behaviour']

# Scale numerical features
scaler = StandardScaler()
X_numerical = scaler.fit_transform(train_df[numerical_cols])

# Encode target
label_encoder = LabelEncoder()
y = label_encoder.fit_transform(train_df['Credit_Score'])
```

## Considerations for Using the Data

### Data Quality Issues

- Some columns may contain placeholder values (e.g., `_`, `________`, `!@9#%8`)
- Credit history age may need conversion from text format
- Some numerical columns may have outliers

### Ethical Considerations

⚠️ **Important**: When using this data for credit scoring models:

- Be aware of potential biases in the data
- Ensure compliance with local financial regulations
- Credit decisions should not be based solely on automated predictions
- Provide transparency and explanations for credit decisions

### Recommended Cleaning Steps

```python
# Example: Handle placeholder values
placeholders = ['_', '________', '!@9#%8', 'NM']
for col in categorical_cols:
    train_df[col] = train_df[col].replace(placeholders, 'Unknown')
```

## Related Models

- **Model**: [AdityaaXD/credit-score-classifier](https://huggingface.co/AdityaaXD/credit-score-classifier)
- **GitHub**: [Credit-Score-Classification](https://github.com/ADITYA-tp01/Credit-Score-Clasification)

## Citation

```bibtex
@dataset{credit-score-dataset,
  author = {Aditya},
  title = {Credit Score Classification Dataset},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/AdityaaXD/credit-score-dataset}
}
```

## Contact

- **Hugging Face**: [@AdityaaXD](https://huggingface.co/AdityaaXD)
- **GitHub**: [@ADITYA-tp01](https://github.com/ADITYA-tp01)