Skip to content

muqadasejaz/Student-Depression-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Student Depression Prediction Using Machine Learning

πŸ“– Project Overview

Depression among students is a serious concern affecting academic performance and overall well-being.
This project analyzes student data, visualizes patterns using EDA, and builds predictive models to identify students at risk. Models such as Logistic Regression, Random Forest, SVM, Decision Tree, KNN, Naive Bayes, Gradient Boosting, AdaBoost, Bagging, and XGBoost are evaluated to find the most effective approach.

Kaggle Notebook: Student Depression Prediction


🎯 Objectives

  • Analyze key factors contributing to student depression
  • Build predictive ML models to classify depression risk
  • Perform EDA to understand feature relationships
  • Evaluate model performance using accuracy, precision, recall, and F1-score
  • Identify the best-performing machine learning model for prediction

✨ Features

  • Exploratory Data Analysis (EDA) including:
    • Sleep duration vs depression
    • Gender vs depression
    • Financial stress vs suicidal thoughts
    • Work/study hours vs depression
    • Academic pressure vs depression
    • Pair plot of all features
  • Multiple ML models for classification
  • Performance metrics for each model: accuracy, precision, recall, F1-score

πŸ›  Tools & Technologies

  • Python

  • Pandas & NumPy (Data manipulation)

  • Matplotlib & Seaborn (Visualization)

  • Scikit-learn (Machine Learning models & evaluation)

  • XGBoost & AdaBoost (Advanced boosting techniques)

  • Jupyter Notebook (Development environment)


πŸ“‚ Dataset

  • Source: Student Depression Dataset

  • Dataset Name: Student Depression Dataset

  • Number of Samples: 5,581

  • Target Variable: Depression (0 = Not Depressed, 1 = Depressed)

  • Features Include:

    • Sleep duration
    • Gender
    • Financial stress
    • Work/study hours
    • Academic pressure
    • Suicidal thoughts

πŸ“Š Model Performance

Model Accuracy
Logistic Regression 0.8364
Random Forest 0.8319
Support Vector Machine 0.8344
Decision Tree 0.8034
K-Nearest Neighbors 0.8169
Naive Bayes 0.8212
Gradient Boosting 0.8375
AdaBoost 0.8389
Bagging Classifier 0.8233
XGBoost 0.8208
  • Best Accuracy Achieved: AdaBoost (83.89%)
  • Classification reports for all models show high precision, recall, and F1-scores for both depressed and non-depressed classes.

πŸ“Š Results

  • EDA:
  • Sleep duration vs depression
image
  • Gender vs depression
image
  • Financial stress vs suicidal thoughts
image
  • Work/study hours vs depression
image
  • Academic pressure vs depression
image
  • Pair plot of all features
image
  • Confusion Matrix:

  • Logistic Regression

image
  • Random Forest
image
  • SVM
image
  • Decision Tree
image
  • KNN
image
  • Naive Bayes
image
  • Gradient Boosting
image
  • AdaBoost
image
  • Bagging
image
  • XGBoost
image

πŸ‘€ Author

Muqadas Ejaz

BS Computer Science (AI Specialization)

AI/ML Engineer

Data Science & Gen AI Enthusiast

πŸ“« Connect with me on LinkedIn

🌐 GitHub: github.com/muqadasejaz

πŸ“¬ Kaggle: Kaggle Profile


πŸ“Ž License

This project is open-source and available under the MIT License.

⭐ If you find this project useful, don’t forget to star the repository!

About

This project focuses on predicting depression among students using various machine learning models. It explores relationships between key factors like sleep duration, gender, financial stress, work/study hours, and academic pressure with depression. The study leverages EDA and multiple ML algorithms to achieve high prediction accuracy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors