AdityaaXD/Credit-Score-Classification
💳 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+… See the full description on the dataset page: https://huggingface.co/datasets/AdityaaXD/Credit-Score-Classification.
010
1---2language:3- en4size_categories:5- 100K<n<1M6task_categories:7- tabular-classification8task_ids:9- multi-class-classification10tags:11- credit-score12- finance13- banking14- tabular15- classification16pretty_name: Credit Score Classification Dataset17---18 19# 💳 Credit Score Classification Dataset20 21A comprehensive dataset for predicting customer credit scores into three categories: **Good**, **Standard**, and **Poor**.22 23## Dataset Description24 25This 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 Summary28 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 Structure38 39### Data Files40 41| File | Description | Size |42|------|-------------|------|43| `train.csv` | Training dataset | ~31 MB |44| `test.csv` | Test dataset | ~15 MB |45 46### Features47 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 Variable81 82| Feature | Description | Classes |83|---------|-------------|---------|84| `Credit_Score` | Credit score classification | Good, Standard, Poor |85 86## Dataset Statistics87 88### Class Distribution89 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## Usage107 108### Loading with Pandas109 110```python111import pandas as pd112 113# Load training data114train_df = pd.read_csv('train.csv')115print(f"Training samples: {len(train_df)}")116print(f"Features: {train_df.columns.tolist()}")117 118# Load test data119test_df = pd.read_csv('test.csv')120print(f"Test samples: {len(test_df)}")121```122 123### Basic Exploration124 125```python126# Check class distribution127print(train_df['Credit_Score'].value_counts())128 129# Check for missing values130print(train_df.isnull().sum())131 132# Statistical summary133print(train_df.describe())134```135 136## Data Preprocessing137 138The following preprocessing steps are recommended:139 1401. **Handle Missing Values**: Some columns may contain missing or placeholder values1412. **Clean Categorical Data**: Handle special characters in categorical columns1423. **Feature Scaling**: Apply StandardScaler to numerical features1434. **Encoding**: Use OneHotEncoder for categorical features, LabelEncoder for target144 145### Example Preprocessing146 147```python148from sklearn.preprocessing import StandardScaler, LabelEncoder, OneHotEncoder149import pandas as pd150 151# Numerical columns152numerical_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 columns160categorical_cols = ['Month', 'Occupation', 'Credit_Mix', 161 'Payment_of_Min_Amount', 'Payment_Behaviour']162 163# Scale numerical features164scaler = StandardScaler()165X_numerical = scaler.fit_transform(train_df[numerical_cols])166 167# Encode target168label_encoder = LabelEncoder()169y = label_encoder.fit_transform(train_df['Credit_Score'])170```171 172## Considerations for Using the Data173 174### Data Quality Issues175 176- Some columns may contain placeholder values (e.g., `_`, `________`, `!@9#%8`)177- Credit history age may need conversion from text format178- Some numerical columns may have outliers179 180### Ethical Considerations181 182⚠️ **Important**: When using this data for credit scoring models:183 184- Be aware of potential biases in the data185- Ensure compliance with local financial regulations186- Credit decisions should not be based solely on automated predictions187- Provide transparency and explanations for credit decisions188 189### Recommended Cleaning Steps190 191```python192# Example: Handle placeholder values193placeholders = ['_', '________', '!@9#%8', 'NM']194for col in categorical_cols:195 train_df[col] = train_df[col].replace(placeholders, 'Unknown')196```197 198## Related Models199 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## Citation204 205```bibtex206@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## Contact216 217- **Hugging Face**: [@AdityaaXD](https://huggingface.co/AdityaaXD)218- **GitHub**: [@ADITYA-tp01](https://github.com/ADITYA-tp01)219 