Skip to content

javin1106/Mental-Health-In-Tech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Mental Wellness Analysis and Support Strategy

Machine Learning Approach to Understanding Mental Health in Tech

Streamlit App Medium Python Docker

A Data Science Project by Javin Chutani


πŸ‘¨β€πŸ’» About

Author: Javin Chutani
Project Type: Machine Learning & Data Analytics
Status: Active


πŸ“– Overview

This project explores mental health challenges faced by employees in the tech industry using machine learning and data analytics. By analyzing survey data from tech workers, the project develops predictive models and insights to help organizations create better mental health support systems.

🎯 Key Objectives

  1. Classification Task - Predict whether an individual is likely to seek mental health treatment based on workplace and personal factors
  2. Regression Task - Predict age of individuals to design age-targeted interventions
  3. Clustering Analysis - Segment tech employees into distinct groups based on mental health indicators for tailored HR policies

✨ Features

  • πŸ” Exploratory Data Analysis (EDA) - Comprehensive visualization and statistical analysis
  • πŸ€– Machine Learning Models
    • Random Forest Classifier
    • XGBoost Classifier
    • Logistic Regression
    • Random Forest Regressor
    • K-Means Clustering
  • πŸ“Š Interactive Dashboard - Streamlit web application for model predictions and insights
  • πŸ“ˆ Model Performance Metrics - ROC curves, confusion matrices, and detailed evaluation
  • 🎨 Data Visualizations - Univariate, bivariate, and multivariate analysis
  • 🐳 Docker Support - Containerized deployment for easy setup

πŸ“‚ Project Structure

188nmv/
β”‚
β”œβ”€β”€ πŸ“ Images/                          # Visualization outputs
β”‚   β”œβ”€β”€ bivariate1.png
β”‚   β”œβ”€β”€ bivariate2.png
β”‚   β”œβ”€β”€ cluster0.png
β”‚   β”œβ”€β”€ cluster1.png
β”‚   β”œβ”€β”€ cluster2.png
β”‚   β”œβ”€β”€ cluster3.png
β”‚   β”œβ”€β”€ dimred.png
β”‚   β”œβ”€β”€ multivariate1.png
β”‚   β”œβ”€β”€ multivariate2.png
β”‚   β”œβ”€β”€ ROC Curve - Classification.png
β”‚   β”œβ”€β”€ univariate1.png
β”‚   └── univariate2.png
β”‚
β”œβ”€β”€ πŸ“ Models & Dataset/                # Trained models and processed data
β”‚   β”œβ”€β”€ classification_model.pkl
β”‚   β”œβ”€β”€ regression_model.pkl
β”‚   └── df.pkl
β”‚
β”œβ”€β”€ πŸ“ Notebooks/                       # Jupyter notebooks for analysis
β”‚   β”œβ”€β”€ EDA.ipynb                       # Exploratory Data Analysis
β”‚   β”œβ”€β”€ classification_model.ipynb      # Classification model training
β”‚   β”œβ”€β”€ regression_model.ipynb          # Regression model training
β”‚   └── clustering.ipynb                # Clustering analysis
β”‚
β”œβ”€β”€ πŸ“ .devcontainer/                   # Development container config
β”‚   └── devcontainer.json
β”‚
β”œβ”€β”€ πŸ“„ app.py                           # Streamlit web application
β”œβ”€β”€ πŸ“„ survey.csv                       # Raw dataset
β”œβ”€β”€ πŸ“„ requirements.txt                 # Python dependencies
β”œβ”€β”€ πŸ“„ Dockerfile                       # Docker configuration
β”œβ”€β”€ πŸ“„ .dockerignore                    # Docker ignore file
└── πŸ“„ README.md                        # Project documentation

πŸš€ Getting Started

Prerequisites

  • Python 3.11 or higher
  • pip package manager
  • Docker (optional, for containerized deployment)

Option 1: Local Installation

  1. Clone the repository

    git clone https://github.com/javin1106/188nmv.git
    cd 188nmv
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the Streamlit app

    streamlit run app.py
  4. Access the application

    • Open your browser and navigate to http://localhost:8501

Option 2: Using Docker

Pull from Docker Hub (Recommended)

The Docker image uses Python 3.11 as the base image for improved performance and compatibility.

Pull from Docker Hub (Recommended)

# Pull the latest image
docker pull javin1106/mental-health-app:latest

# Run the container
docker run -p 8501:8501 javin1106/mental-health-app:latest

Or Build Locally

# Build the image
docker build -t mental-health-app .

# Run the container
docker run -p 8501:8501 mental-health-app

Docker Compose (if available)

docker-compose up

Access the application:

  • Open your browser and navigate to http://localhost:8501

πŸ“Š Dataset

Source: Mental Health in Tech Survey - Kaggle

The dataset contains responses from tech employees regarding:

  • Demographics (age, gender, country)
  • Work environment characteristics
  • Mental health history
  • Workplace mental health benefits
  • Attitudes toward mental health treatment

πŸ§ͺ Methodology

1. Data Preprocessing

  • Handling missing values
  • Feature engineering
  • Encoding categorical variables
  • Data normalization and scaling

2. Exploratory Data Analysis

  • Univariate, bivariate, and multivariate analysis
  • Correlation analysis
  • Distribution plots and statistical summaries

3. Model Development

Classification Model

  • Target Variable: Treatment seeking behavior
  • Algorithms: Logistic Regression, Random Forest, XGBoost
  • Evaluation Metrics: Accuracy, Precision, Recall, F1-Score, ROC-AUC

Regression Model

  • Target Variable: Age prediction
  • Algorithms: Linear Regression, Random Forest Regressor
  • Evaluation Metrics: RMSE, MAE, RΒ² Score

Clustering Analysis

  • Algorithm: K-Means Clustering
  • Purpose: Segmentation of employees based on mental health patterns

πŸ“ˆ Results

The models demonstrate strong predictive capabilities in identifying:

  • Employees at risk of mental health issues
  • Key workplace factors influencing mental wellness
  • Distinct employee segments requiring different support strategies

For detailed results and insights, please refer to the Technical Report.


🌐 Live Demo

Experience the interactive dashboard: Launch App


πŸ› οΈ Technologies Used

  • Python - Core programming language
  • Pandas & NumPy - Data manipulation and analysis
  • Scikit-learn - Machine learning algorithms
  • XGBoost - Gradient boosting framework
  • Matplotlib & Seaborn - Data visualization
  • Streamlit - Web application framework
  • Joblib - Model serialization
  • Docker - Containerization and deployment

πŸ“ Key Insights

  • Family history of mental health issues is a strong predictor of treatment seeking
  • Remote work policies impact mental wellness differently across demographics
  • Company size and benefits significantly influence employee mental health
  • Age-specific interventions can improve support program effectiveness

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


πŸ“œ License

This project is open source and available for educational and research purposes.


πŸ™ Acknowledgements


πŸ“§ Contact

Javin Chutani


Made with ❀️ for improving mental health awareness in tech

⭐ Star this repository if you find it helpful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors