Davichick commited on
Commit
452bf06
·
verified ·
1 Parent(s): d66c07e

Update ReadMe.md

Browse files
Files changed (1) hide show
  1. ReadMe.md +21 -17
ReadMe.md CHANGED
@@ -30,10 +30,14 @@ The dataset consists of 100,000 rows and 28 features. It provides a holistic vie
30
  ## Phase 1: Data Cleaning & Preprocessing
31
  This dataset was intentionally designed to be messy, mimicking real-world data entry errors. I followed a strict chronological process to clean it:
32
 
33
- 1. **Fixing Mixed Data Types:** I identified several columns, such as Age and Annual Income, that were incorrectly stored as strings. This happened because of special characters like underscores (_). I used string manipulation to remove these characters and converted the columns to numeric values (float/int).
34
- 2. **Handling Placeholders:** Instead of empty cells (NaN), many categorical columns used "placeholders" like _______ or _. I identified these as missing data and replaced them with the label **Unknown**. This allowed me to keep the rows for analysis without making false assumptions about the data.
35
- 3. **Missing Value Treatment:** For numeric columns, I filled missing values with the **Median**. I chose the median over the mean because the dataset contained extreme outliers that would have skewed a simple average.
36
- 4. **Outlier Detection & Handling:** I found many unrealistic values, such as an age of 8,000 or interest rates over 5,000%. I decided to "cap" these values or replace them with the Median. This step was crucial to ensure that my later visualizations and statistics were accurate and readable.
 
 
 
 
37
 
38
  ---
39
 
@@ -41,20 +45,16 @@ This dataset was intentionally designed to be messy, mimicking real-world data e
41
  Once the data was clean, I moved to the visualization stage to tell the "story" of the data.
42
 
43
  ### Target and Demographics
44
- I first looked at the **Credit Score Distribution**. As shown below, the "Standard" rating is the most common, while "Good" credit is the rarest. This tells me that achieving a top-tier credit score is difficult for the average person in this dataset.
45
 
46
  ![Credit Score Distribution](Credit%20Score%20Distribution.png)
47
 
48
- When I analyzed the **Age Distribution**, I noticed something interesting. The graph seems to end around age 60. However, my statistical summary shows that there are people as old as 100 in the data. The reason the graph looks this way is that the vast majority of customers are in their 20s and 30s. The concentration of young people is so high that the bars for people over 60 are too small to be visible on this scale.
49
 
50
  ![Age Distribution](Age%20Distribution.png)
51
 
52
  ### Financial Insights
53
- For the **Annual Income** graph, I filtered the view to show only those earning under 250,000. I did this because the extreme "wealthy" outliers made the rest of the chart impossible to read. By focusing on the 99% of the population, I could see a clear "long-tail" distribution where most people earn between 20k and 70k.
54
-
55
- ![Annual Income Filtered](Annual%20Income%20Filtered.png)
56
-
57
- I also generated a **Correlation Heatmap** to find the "hidden" links between variables. This was a key step because it highlighted that **Interest Rate** and **Outstanding Debt** have the strongest negative correlation with the credit score. In simple terms: as your debt and interest rates go up, your credit score almost always goes down.
58
 
59
  ![Correlation Heatmap](Correlation%20Heatmap.png)
60
 
@@ -64,25 +64,29 @@ I also generated a **Correlation Heatmap** to find the "hidden" links between va
64
  **My Research Question:** *"What are the key financial behaviors that separate a Good credit customer from a Poor one?"*
65
 
66
  ### 1. The Occupational Factor
67
- I used a grouped Bar Chart to see if certain jobs lead to better credit. I was surprised to find that the credit score distribution is almost identical across all professions. This proves that your **financial habits** (how you spend and save) are far more important than your **job title**.
68
 
69
  ![Occupation Analysis](Occupation%20Analysis.png)
70
 
71
  ### 2. The Delay Threshold
72
- Using a Boxplot, I looked for the "tipping point" for a bad credit score. I discovered that customers with a "Good" rating rarely have more than 8-10 delayed payments. However, once a customer crosses into the "Poor" category, the median number of delays jumps to 17. This visual clearly defines the threshold for financial reliability.
73
 
74
  ![Delayed Payments Analysis](Delayed%20Payments%20Analysis.png)
75
 
76
  ### 3. The Debt Burden
77
- Finally, I compared **Outstanding Debt** against the **Overall Average (1426.22)**. I used a KDE plot to show the density of each group. The blue "Good" curve is peaked far to the left of the average line, while the green "Poor" curve is shifted heavily to the right. This is a clear visual representation of the "Debt Trap."
78
 
79
  ![Debt Comparison KDE](Debt%20Comparison%20KDE.png)
80
 
81
  ---
82
 
83
- ## Conclusion
84
- This EDA taught me that a high credit score is not necessarily about how much you earn, but about how you manage your obligations. Based on my research, the two most important actions a person can take to maintain a Good rating are keeping their total debt below the average and strictly limiting the number of delayed payments to under 10.
 
 
 
 
85
 
86
  ## Libraries Used
87
- * **Pandas & Numpy:** For data manipulation and cleaning.
88
  * **Matplotlib & Seaborn:** For professional-grade visualizations and statistical plotting.
 
30
  ## Phase 1: Data Cleaning & Preprocessing
31
  This dataset was intentionally designed to be messy, mimicking real-world data entry errors. I followed a strict chronological process to clean it:
32
 
33
+ 1. **Fixing Mixed Data Types:** I identified columns such as Age and Annual Income that were incorrectly stored as strings due to special characters like underscores (_). I removed these and converted the columns to numeric values.
34
+ 2. **Handling Placeholders:** I replaced categorical "placeholders" like _______ or _ with the label **Unknown**, allowing me to keep the data rows without making false assumptions.
35
+ 3. **Outlier Detection & "Capping" Strategy:** I discovered extreme outliers, such as an age of 8,000 or interest rates over 5,000%.
36
+
37
+ **Why I chose Capping with the Median:**
38
+ I decided to handle these outliers by "Capping" them—replacing extreme, unrealistic values with the **Median** of the column. I chose this approach because the Median is a "robust" measure of central tendency; it represents the true middle of the data and isn't pulled away by crazy numbers like the Average (Mean) would be. By using Capping instead of deleting rows, I preserved the 100,000-row size of my dataset while ensuring that these errors didn't skew my graphs or lead to wrong conclusions. It allowed me to neutralize the "noise" without losing valuable information in other columns of the same row.
39
+
40
+ [Image of median vs mean with outliers]
41
 
42
  ---
43
 
 
45
  Once the data was clean, I moved to the visualization stage to tell the "story" of the data.
46
 
47
  ### Target and Demographics
48
+ I first looked at the **Credit Score Distribution**. The "Standard" rating is the most common, while "Good" credit is the rarest, showing how difficult it is to reach the top tier.
49
 
50
  ![Credit Score Distribution](Credit%20Score%20Distribution.png)
51
 
52
+ When I analyzed the **Age Distribution**, the graph appeared to end around age 60. Even though I have people as old as 100 in the cleaned data, the concentration of young adults in their 20s and 30s is so high that the bars for seniors are too small to be visible on this scale. This gave me a clear understanding that the dataset represents a primarily young demographic.
53
 
54
  ![Age Distribution](Age%20Distribution.png)
55
 
56
  ### Financial Insights
57
+ For **Annual Income**, I filtered the view to under 250,000 to focus on the 99% of the population. My **Correlation Heatmap** was a key discovery tool; it highlighted that Interest Rate and Outstanding Debt have the strongest negative correlation with the credit score. As debt goes up, the score almost always goes down.
 
 
 
 
58
 
59
  ![Correlation Heatmap](Correlation%20Heatmap.png)
60
 
 
64
  **My Research Question:** *"What are the key financial behaviors that separate a Good credit customer from a Poor one?"*
65
 
66
  ### 1. The Occupational Factor
67
+ I found that credit score distribution is almost identical across all professions. This proves that **financial habits** are far more important than a **job title**.
68
 
69
  ![Occupation Analysis](Occupation%20Analysis.png)
70
 
71
  ### 2. The Delay Threshold
72
+ Using a Boxplot, I discovered a clear "tipping point": customers with a "Good" rating rarely have more than 8-10 delayed payments. Once a customer crosses 15-17 delays, they almost certainly fall into the "Poor" category.
73
 
74
  ![Delayed Payments Analysis](Delayed%20Payments%20Analysis.png)
75
 
76
  ### 3. The Debt Burden
77
+ I compared **Outstanding Debt** against the **Overall Average (1426.22)**. The blue "Good" curve is peaked far to the left of the average line, while the green "Poor" curve is shifted heavily to the right. This is the "Debt Trap" in visual form.
78
 
79
  ![Debt Comparison KDE](Debt%20Comparison%20KDE.png)
80
 
81
  ---
82
 
83
+ ## Final Conclusion & Summary
84
+ This project has been a complete journey from raw, "dirty" data to actionable financial insights.
85
+
86
+ **My primary conclusion** is that a high credit score is not a result of high income or a prestigious job. Instead, it is a reflection of **financial discipline**. Through my analysis, I proved that the two most critical "red flags" for a credit score are carrying an **Outstanding Debt** higher than the population average and allowing **Delayed Payments** to exceed a count of 10.
87
+
88
+ By successfully cleaning the data using the **Capping** method, I was able to create a stable and reliable dataset. This ensures that any future machine learning models built on this data will be much more accurate and won't be confused by the original data entry errors. The "Good" customer profile is now clearly defined: low debt, few delays, and consistent payment behavior.
89
 
90
  ## Libraries Used
91
+ * **Pandas & Numpy:** For data manipulation, cleaning, and capping.
92
  * **Matplotlib & Seaborn:** For professional-grade visualizations and statistical plotting.