Bashifu commited on
Commit
bb3ae08
Β·
verified Β·
1 Parent(s): 8958884

Upload 3 files

Browse files
Copy_of_Assignment_1_EDA_&_Dataset (1).ipynb ADDED
The diff for this file is too large to render. See raw diff
 
README.md ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # πŸŽ“ Student Dropout Prediction Dataset β€” EDA Assignment
2
+
3
+ > **By Tomer Bash** | Data Science Course β€” Assignment #1
4
+
5
+ ---
6
+
7
+ ## πŸ“Ή Presentation Video
8
+
9
+ Presentation Video link - https://youtu.be/KyafBx9W7Qg
10
+
11
+ <video src="presentation.mp4" controls="controls" style="max-width: 720px;"></video>
12
+
13
+ ---
14
+
15
+ ## πŸ“Œ Dataset Overview
16
+
17
+ | Property | Details |
18
+ |----------|---------|
19
+ | **Source** | Kaggle |
20
+ | **Rows** | 4,424 students |
21
+ | **Features** | 35 columns |
22
+ | **Target Variable** | `Target` β€” `Graduate`, `Enrolled`, `Dropout` |
23
+ | **Task Type** | Multi-class Classification |
24
+
25
+ The dataset contains demographic, financial, academic, and application-related information about students at a Portuguese higher education institution. The primary goal is to understand and predict **student dropout before first-year academic results are available**.
26
+
27
+ ---
28
+
29
+ ## 🎯 Research Goal
30
+
31
+ > **Can we predict whether a student will drop out β€” early, before first-year grades are available?**
32
+
33
+ ---
34
+
35
+ ## 🧹 Part 1: Data Cleaning & Preparation
36
+
37
+ - **No missing values** β€” `df.isnull().sum()` returned 0 for all columns.
38
+ - **No duplicate rows** β€” `df.duplicated().sum()` returned 0.
39
+ - All 35 features are numeric (int/float) β€” verified with `df.info()`.
40
+ - Target column contains exactly 3 classes: `Graduate`, `Enrolled`, `Dropout`.
41
+ - **Class imbalance noted:**
42
+ - Graduate: 2,209
43
+ - Dropout: 1,421
44
+ - Enrolled: 794
45
+ - **Outlier detection:** Age at enrollment shows right-skewed distribution with outliers at high ages β€” identified using a boxplot.
46
+ - **Grade anomaly detected:** Significant spike at grade = 0 in 1st semester grades β€” investigated and documented below.
47
+
48
+ ---
49
+
50
+ ## πŸ“Š Part 2: Exploratory Data Analysis
51
+
52
+ ### πŸ“ˆ Target Distribution
53
+
54
+ The dataset is imbalanced. Graduate is the majority class, followed by Dropout, and Enrolled is the smallest group. This imbalance must be handled carefully in any downstream modeling.
55
+
56
+ ---
57
+
58
+ ### πŸ‘€ Age at Enrollment
59
+
60
+ - Distribution is **right-skewed** β€” most students enroll young, but a long tail of older students exists.
61
+ - Boxplot reveals several **outliers at high ages** (up to ~70).
62
+ - **The Dropout group has a higher average age** than the Graduate group β€” age at enrollment is a risk factor.
63
+
64
+ | Group | Avg Age at Enrollment |
65
+ |---|---|
66
+ | Graduate | ~22 |
67
+ | Enrolled | ~23 |
68
+ | Dropout | ~26 |
69
+
70
+ ---
71
+
72
+ ### πŸ“š 1st Semester Grades β€” The 0-Grade Anomaly
73
+
74
+ - Grades follow a near-normal distribution overall.
75
+ - A **massive spike at grade = 0** was detected β€” far more students received exactly 0 than expected.
76
+ - Upon investigation: some students with grade = 0 **still graduated**.
77
+ - **Conclusion:** The 0-grade entries likely represent administrative records (late withdrawals, course deregistrations), not pure academic failure. This is a data quality issue to flag for modeling.
78
+ - The anomaly is **concentrated in Course 2 (Animation degree)**, though the proportion is consistent with class sizes.
79
+
80
+ ---
81
+
82
+ ### πŸ’° Financial Factors β€” Primary Predictor
83
+
84
+ Financial health is the strongest non-academic predictor of student outcomes.
85
+
86
+ | Financial Factor | Effect on Dropout |
87
+ |---|---|
88
+ | **Tuition fees not up to date** | Overwhelmingly **high** dropout rate |
89
+ | **Scholarship holder** | Drastically **reduces** dropout risk |
90
+ | **University debtor** | Significantly **increases** dropout risk |
91
+
92
+ > Students not keeping up with tuition fees show the single highest dropout signal in the entire dataset.
93
+
94
+ ---
95
+
96
+ ### ⚧ Gender
97
+
98
+ - **Female students (0)** show a slightly higher graduation rate and lower dropout rate than male students (1).
99
+ - The difference is modest but consistent across the dataset.
100
+
101
+ ---
102
+
103
+ ### πŸ›οΈ Application Mode
104
+
105
+ - Top 5 most common application modes were analyzed.
106
+ - **Application Mode 12 (Over 23 years old)** has the highest dropout rate β€” consistent with the age finding above.
107
+ - Standard routes (1st phase general contingent) perform best overall.
108
+
109
+ ---
110
+
111
+ ### πŸ”₯ Correlation Heatmap
112
+
113
+ Features analyzed: Age at enrollment, Tuition fees up to date, Scholarship holder, 1st & 2nd semester grades, GDP, Target (encoded 0=Dropout, 1=Enrolled, 2=Graduate).
114
+
115
+ **Key findings:**
116
+ - βœ… **Grades** and **financial stability** are the strongest positive predictors of graduation.
117
+ - ❌ **Age at enrollment** correlates negatively with graduation.
118
+ - πŸ“‰ **GDP** shows almost no direct linear impact β€” individual finances matter more than the macro economy.
119
+
120
+ ---
121
+
122
+ ## 🏁 Conclusion
123
+
124
+ ### 1. πŸ’° Financial Stability β€” Primary Predictor
125
+ Scholarships drastically reduce dropout. Unpaid tuition and university debt dramatically raise it. Crucially, these signals exist **before** first-year grades are available β€” enabling early identification of at-risk students.
126
+
127
+ ### 2. πŸ“š Grades & the 0-Grade Anomaly
128
+ High grades are a strong positive predictor of graduation. The spike at grade = 0 is likely administrative, not academic β€” some 0-grade students still graduated.
129
+
130
+ ### 3. πŸŽ‚ Older Students Are at Higher Risk
131
+ Age at enrollment correlates negatively with graduation. Students admitted via Mode 12 ("Over 23") have the highest dropout rates β€” likely due to work and family pressures.
132
+
133
+ ### 4. 🌍 Macro Economy Has No Direct Linear Effect
134
+ National GDP shows near-zero correlation with the target. Individual financial circumstances matter far more.
135
+
136
+ ---
137
+
138
+ ## πŸ“ Repository Contents
139
+
140
+ | File | Description |
141
+ |------|-------------|
142
+ | `dataset.csv` | The full student dataset (4,424 Γ— 35) |
143
+ | `Assignment_1_EDA_Tomer_Bash.ipynb` | Full EDA notebook with code & visualizations |
144
+ | `README.md` | This file |
145
+ | `presentation.mp4` | Video walkthrough (2–3 min) |
146
+
147
+ ---
148
+
149
+ ## πŸ› οΈ Technologies Used
150
+
151
+ `Python 3` Β· `pandas` Β· `numpy` Β· `matplotlib` Β· `seaborn` Β· `Jupyter Notebook`
152
+
153
+ ---
154
+
155
+ *Dataset originally sourced from Kaggle. Uploaded to HuggingFace as part of Data Science Course Assignment #1.*
dataset.csv ADDED
The diff for this file is too large to render. See raw diff