AdityaaXD commited on
Commit
78c19a1
·
verified ·
1 Parent(s): 3222eab

First Commit

Browse files
Files changed (1) hide show
  1. README.md +218 -0
README.md ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ size_categories:
5
+ - 100K<n<1M
6
+ task_categories:
7
+ - tabular-classification
8
+ task_ids:
9
+ - multi-class-classification
10
+ tags:
11
+ - credit-score
12
+ - finance
13
+ - banking
14
+ - tabular
15
+ - classification
16
+ pretty_name: Credit Score Classification Dataset
17
+ ---
18
+
19
+ # 💳 Credit Score Classification Dataset
20
+
21
+ A comprehensive dataset for predicting customer credit scores into three categories: **Good**, **Standard**, and **Poor**.
22
+
23
+ ## Dataset Description
24
+
25
+ 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.
26
+
27
+ ### Dataset Summary
28
+
29
+ | Property | Value |
30
+ |----------|-------|
31
+ | **Total Samples** | ~100,000+ |
32
+ | **Features** | 22 (17 numerical + 5 categorical) |
33
+ | **Target Classes** | Good, Standard, Poor |
34
+ | **Format** | CSV |
35
+ | **Language** | English |
36
+
37
+ ## Dataset Structure
38
+
39
+ ### Data Files
40
+
41
+ | File | Description | Size |
42
+ |------|-------------|------|
43
+ | `train.csv` | Training dataset | ~31 MB |
44
+ | `test.csv` | Test dataset | ~15 MB |
45
+
46
+ ### Features
47
+
48
+ #### Numerical Features (17)
49
+
50
+ | Feature | Description | Data Type |
51
+ |---------|-------------|-----------|
52
+ | `Age` | Customer's age in years | Integer |
53
+ | `Annual_Income` | Yearly income | Float |
54
+ | `Monthly_Inhand_Salary` | Monthly take-home salary | Float |
55
+ | `Num_Bank_Accounts` | Number of bank accounts owned | Integer |
56
+ | `Num_Credit_Card` | Number of credit cards | Integer |
57
+ | `Interest_Rate` | Average interest rate on credit | Integer |
58
+ | `Num_of_Loan` | Number of active loans | Integer |
59
+ | `Delay_from_due_date` | Average payment delay in days | Integer |
60
+ | `Num_of_Delayed_Payment` | Count of delayed payments | Integer |
61
+ | `Changed_Credit_Limit` | Credit limit change percentage | Float |
62
+ | `Num_Credit_Inquiries` | Number of credit inquiries | Integer |
63
+ | `Outstanding_Debt` | Total outstanding debt amount | Float |
64
+ | `Credit_Utilization_Ratio` | Credit utilization percentage | Float |
65
+ | `Credit_History_Age_Months` | Length of credit history in months | Integer |
66
+ | `Total_EMI_per_month` | Monthly EMI payments | Float |
67
+ | `Amount_invested_monthly` | Monthly investment amount | Float |
68
+ | `Monthly_Balance` | Average monthly balance | Float |
69
+
70
+ #### Categorical Features (5)
71
+
72
+ | Feature | Description | Categories |
73
+ |---------|-------------|------------|
74
+ | `Month` | Month of record | January - December |
75
+ | `Occupation` | Employment type | Accountant, Architect, Developer, Doctor, Engineer, Entrepreneur, Journalist, Lawyer, Manager, Mechanic, Media_Manager, Musician, Scientist, Teacher, Writer |
76
+ | `Credit_Mix` | Types of credit accounts | Bad, Good, Standard |
77
+ | `Payment_of_Min_Amount` | Minimum payment behavior | Yes, No, NM |
78
+ | `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 |
79
+
80
+ #### Target Variable
81
+
82
+ | Feature | Description | Classes |
83
+ |---------|-------------|---------|
84
+ | `Credit_Score` | Credit score classification | Good, Standard, Poor |
85
+
86
+ ## Dataset Statistics
87
+
88
+ ### Class Distribution
89
+
90
+ | Class | Description |
91
+ |-------|-------------|
92
+ | **Good** | Customers with excellent credit profiles |
93
+ | **Standard** | Customers with average credit profiles |
94
+ | **Poor** | Customers with concerning credit profiles |
95
+
96
+ ### Feature Statistics (Approximate)
97
+
98
+ | Feature | Min | Max | Mean |
99
+ |---------|-----|-----|------|
100
+ | Age | 14 | 100 | ~35 |
101
+ | Annual_Income | 0 | 500,000 | ~50,000 |
102
+ | Num_Bank_Accounts | 0 | 20 | ~5 |
103
+ | Credit_Utilization_Ratio | 0% | 100% | ~30% |
104
+ | Credit_History_Age_Months | 0 | 500 | ~200 |
105
+
106
+ ## Usage
107
+
108
+ ### Loading with Pandas
109
+
110
+ ```python
111
+ import pandas as pd
112
+
113
+ # Load training data
114
+ train_df = pd.read_csv('train.csv')
115
+ print(f"Training samples: {len(train_df)}")
116
+ print(f"Features: {train_df.columns.tolist()}")
117
+
118
+ # Load test data
119
+ test_df = pd.read_csv('test.csv')
120
+ print(f"Test samples: {len(test_df)}")
121
+ ```
122
+
123
+ ### Basic Exploration
124
+
125
+ ```python
126
+ # Check class distribution
127
+ print(train_df['Credit_Score'].value_counts())
128
+
129
+ # Check for missing values
130
+ print(train_df.isnull().sum())
131
+
132
+ # Statistical summary
133
+ print(train_df.describe())
134
+ ```
135
+
136
+ ## Data Preprocessing
137
+
138
+ The following preprocessing steps are recommended:
139
+
140
+ 1. **Handle Missing Values**: Some columns may contain missing or placeholder values
141
+ 2. **Clean Categorical Data**: Handle special characters in categorical columns
142
+ 3. **Feature Scaling**: Apply StandardScaler to numerical features
143
+ 4. **Encoding**: Use OneHotEncoder for categorical features, LabelEncoder for target
144
+
145
+ ### Example Preprocessing
146
+
147
+ ```python
148
+ from sklearn.preprocessing import StandardScaler, LabelEncoder, OneHotEncoder
149
+ import pandas as pd
150
+
151
+ # Numerical columns
152
+ numerical_cols = ['Age', 'Annual_Income', 'Monthly_Inhand_Salary',
153
+ 'Num_Bank_Accounts', 'Num_Credit_Card', 'Interest_Rate',
154
+ 'Num_of_Loan', 'Delay_from_due_date', 'Num_of_Delayed_Payment',
155
+ 'Changed_Credit_Limit', 'Num_Credit_Inquiries', 'Outstanding_Debt',
156
+ 'Credit_Utilization_Ratio', 'Credit_History_Age_Months',
157
+ 'Total_EMI_per_month', 'Amount_invested_monthly', 'Monthly_Balance']
158
+
159
+ # Categorical columns
160
+ categorical_cols = ['Month', 'Occupation', 'Credit_Mix',
161
+ 'Payment_of_Min_Amount', 'Payment_Behaviour']
162
+
163
+ # Scale numerical features
164
+ scaler = StandardScaler()
165
+ X_numerical = scaler.fit_transform(train_df[numerical_cols])
166
+
167
+ # Encode target
168
+ label_encoder = LabelEncoder()
169
+ y = label_encoder.fit_transform(train_df['Credit_Score'])
170
+ ```
171
+
172
+ ## Considerations for Using the Data
173
+
174
+ ### Data Quality Issues
175
+
176
+ - Some columns may contain placeholder values (e.g., `_`, `________`, `!@9#%8`)
177
+ - Credit history age may need conversion from text format
178
+ - Some numerical columns may have outliers
179
+
180
+ ### Ethical Considerations
181
+
182
+ ⚠️ **Important**: When using this data for credit scoring models:
183
+
184
+ - Be aware of potential biases in the data
185
+ - Ensure compliance with local financial regulations
186
+ - Credit decisions should not be based solely on automated predictions
187
+ - Provide transparency and explanations for credit decisions
188
+
189
+ ### Recommended Cleaning Steps
190
+
191
+ ```python
192
+ # Example: Handle placeholder values
193
+ placeholders = ['_', '________', '!@9#%8', 'NM']
194
+ for col in categorical_cols:
195
+ train_df[col] = train_df[col].replace(placeholders, 'Unknown')
196
+ ```
197
+
198
+ ## Related Models
199
+
200
+ - **Model**: [AdityaaXD/credit-score-classifier](https://huggingface.co/AdityaaXD/credit-score-classifier)
201
+ - **GitHub**: [Credit-Score-Classification](https://github.com/ADITYA-tp01/Credit-Score-Clasification)
202
+
203
+ ## Citation
204
+
205
+ ```bibtex
206
+ @dataset{credit-score-dataset,
207
+ author = {Aditya},
208
+ title = {Credit Score Classification Dataset},
209
+ year = {2026},
210
+ publisher = {Hugging Face},
211
+ url = {https://huggingface.co/datasets/AdityaaXD/credit-score-dataset}
212
+ }
213
+ ```
214
+
215
+ ## Contact
216
+
217
+ - **Hugging Face**: [@AdityaaXD](https://huggingface.co/AdityaaXD)
218
+ - **GitHub**: [@ADITYA-tp01](https://github.com/ADITYA-tp01)