{"id":26198402,"url":"https://github.com/junayed-hasan/occupational-stress-ml","last_synced_at":"2026-03-10T10:06:33.421Z","repository":{"id":281456172,"uuid":"895032684","full_name":"junayed-hasan/occupational-stress-ml","owner":"junayed-hasan","description":"This repository contains code, datasets, and analysis for AI-driven occupational stress detection using machine learning, deep learning, and NLP. It includes feature selection, explainable AI, synthetic data generation, and model validation for workplace safety applications. 🚀","archived":false,"fork":false,"pushed_at":"2025-03-15T03:12:51.000Z","size":18455,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T12:45:51.457Z","etag":null,"topics":["anova","cross-validation","deployment-automation","explainable-ai","exploratory-data-analysis","huggingface","large-language-models","machine-learning","rfecv","synthetic-dataset-generation"],"latest_commit_sha":null,"homepage":"https://huggingface.co/spaces/JnS123456/Occupational_stress_detection","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junayed-hasan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-27T12:46:28.000Z","updated_at":"2025-04-13T17:32:38.000Z","dependencies_parsed_at":"2025-06-30T12:49:10.592Z","dependency_job_id":null,"html_url":"https://github.com/junayed-hasan/occupational-stress-ml","commit_stats":null,"previous_names":["junayed-hasan/occupational-stress-ml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/junayed-hasan/occupational-stress-ml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junayed-hasan%2Foccupational-stress-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junayed-hasan%2Foccupational-stress-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junayed-hasan%2Foccupational-stress-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junayed-hasan%2Foccupational-stress-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junayed-hasan","download_url":"https://codeload.github.com/junayed-hasan/occupational-stress-ml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junayed-hasan%2Foccupational-stress-ml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30329698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anova","cross-validation","deployment-automation","explainable-ai","exploratory-data-analysis","huggingface","large-language-models","machine-learning","rfecv","synthetic-dataset-generation"],"created_at":"2025-03-12T02:52:03.806Z","updated_at":"2026-03-10T10:06:33.400Z","avatar_url":"https://github.com/junayed-hasan.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Early detection of occupational stress: Enhancing workplace safety with machine learning and large language models\n**📌 A Machine Learning, Deep Learning, and NLP-based Approach**  \n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)  \n[![Python](https://img.shields.io/badge/Made%20with-Python-blue.svg)](https://www.python.org/)  \n[![Jupyter](https://img.shields.io/badge/Notebooks-Jupyter-orange.svg)](https://jupyter.org/)  \n[![Contributions](https://img.shields.io/badge/Contributions-Welcome-brightgreen.svg)](#contributing)  \n\n---\n\n## 📖 Table of Contents  \n\n1. [🔍 Overview](#-overview)  \n2. [📂 Repository Structure](#-repository-structure)  \n3. [💻 Tech Stack](#-tech-stack)  \n4. [🚀 Getting Started](#-getting-started)  \n5. [🔪 Usage](#-usage)  \n6. [📊 Results \u0026 Key Findings](#-results--key-findings)  \n7. [📌 Industry Relevance](#-industry-relevance)  \n8. [📝 License](#-license)  \n9. [🤝 Contributing](#-contributing)  \n10. [📬 Contact](#-contact)  \n\n---\n\n## 🔍 Overview  \n\n**Workplace stress** is a critical issue that impacts **employee well-being, organizational efficiency, and workplace safety**. This repository provides **cutting-edge AI solutions** for detecting, analyzing, and mitigating occupational stress using a combination of:  \n\n✅ **Machine Learning (ML)** for stress detection models.  \n✅ **Deep Learning (DL)** using advanced neural networks.  \n✅ **Natural Language Processing (NLP)** to extract insights from survey data.  \n✅ **Explainable AI (XAI)** for interpretability in workplace safety decisions.  \n✅ **Synthetic Data Generation** to validate model generalizability.  \n\n**Why does this matter?**  \n- Stressed workers are **more prone to workplace accidents** and lower productivity.  \n- Organizations spend billions annually on absenteeism and medical costs due to work-related stress.  \n- Traditional stress assessments (e.g., surveys, self-reports) are slow, subjective, and lack predictive power.  \n\n**Our AI-driven approach** automates stress detection, enhances workplace safety, and enables proactive decision-making for both **organizations** and **policymakers**.\n\n---\n\n## 📂 Repository Structure  \n\n```\n📦 Occupational-Stress-Safety\n├── Main_results_holdout_val.ipynb      # Main results reported in paper using holdout validation \n├── explainable_ai/                     # XAI-based analysis  \n│   ├── XAI_Occupational_Stress.ipynb   \n│\n├── SOTA_analysis/                      # State-of-the-art comparison  \n│   ├── SOTA_Paper_1.ipynb  \n│   ├── SOTA_Paper_2.ipynb  \n│   └── ...  \n│\n├── domain_analysis/                    # LLM-driven analysis  \n│   ├── LLM_anova_+_rfecv.ipynb  \n│\n├── cross-validation/                    # Model validation  \n│   ├── cross-validation.ipynb  \n│\n├── anova/                               # ANOVA-based feature selection  \n│   ├── anova.ipynb  \n│\n├── rfecv/                               # Recursive feature elimination  \n│   ├── RFECV.ipynb  \n│\n├── synthetic_data_generation/           # Synthetic dataset generation  \n│   ├── Synthetic_data_generation.ipynb  \n│   ├── Synthetic_data_comparison.ipynb  \n│\n├── eda/                                 # Exploratory Data Analysis  \n│   ├── EDA_Occupational_Stress.ipynb  \n│\n├── ablations/                           # Impact of feature selection  \n│   ├── Ablation_no_RFECV.ipynb  \n│   ├── Ablation_no_anova.ipynb  \n│   ├── Ablation_no_zero_var.ipynb  \n│\n├── dataset/                             # Raw dataset  \n│   ├── DIB dataset and codebook.xlsx  \n│\n├── synthetic_dataset/                   # Generated datasets  \n│   ├── synthetic_data_tvae.csv  \n│   ├── synthetic_data_gaussian_copula.csv  \n│   ├── synthetic_data_ctgan.csv  \n│   ├── synthetic_data_copulaGan.csv  \n│\n├── LICENSE                              # MIT License  \n└── README.md                            # This file  \n```\n\n---\n\n## 💻 Tech Stack  \n\n| Technology       | Usage |  \n|-----------------|------------------------------------------------|  \n| **Python**      | Core programming language |  \n| **Jupyter**     | Interactive computing environment |  \n| **Pandas**      | Data manipulation |  \n| **NumPy**       | Numerical computing |  \n| **Scikit-learn**| Machine learning models \u0026 evaluation |  \n| **PyTorch**  | Deep learning framework |  \n| **Hugging Face Transformers** | NLP and Large Language Models |  \n| **Seaborn \u0026 Matplotlib** | Data visualization |  \n| **SHAP \u0026 LIME** | Explainable AI (XAI) |  \n\n---\n\n## 🚀 Getting Started  \n\n1. **Clone the Repository**  \n   ```bash\n   git clone https://github.com/junayed-hasan/occupational-stress-ml.git\n   cd Occupational-Stress-Safety\n   ```\n\n2. **Create a Virtual Environment**  \n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # Mac/Linux\n   .\\venv\\Scripts\\activate   # Windows\n   ```\n\n3. **Install Dependencies**  \n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Run Jupyter Notebooks**  \n   ```bash\n   jupyter notebook\n   ```\n\n---\n\n## 🔪 Usage  \n\n### **1️⃣ Data Preprocessing \u0026 EDA**  \n   - Run `eda/EDA_Occupational_Stress.ipynb` to explore dataset characteristics.  \n\n### **2️⃣ Feature Selection \u0026 Model Training**  \n   - `anova/anova.ipynb` for ANOVA-based feature selection.  \n   - `rfecv/RFECV.ipynb` for recursive feature elimination.  \n   - `cross-validation/cross-validation.ipynb` to validate models.  \n\n### **3️⃣ Synthetic Data Generation**  \n   - Run `synthetic_data_generation/Synthetic_data_generation.ipynb` to generate synthetic datasets.  \n\n### **4️⃣ Explainability \u0026 Domain Analysis**  \n   - `explainable_ai/XAI_Occupational_Stress.ipynb` provides model interpretability.  \n   - `domain_analysis/LLM_anova_+_rfecv.ipynb` utilizes NLP models for deeper insights.  \n\n---\n\n## 📊 Results \u0026 Key Findings  \n\n- **📌 Achieved 90.32% Accuracy** in occupational stress classification.  \n- **📌 Top predictors of stress:** Workload, Manager Support, Job Role Clarity.  \n- **📌 LLMs outperformed traditional NLP models in stress classification tasks.**  \n- **📌 Synthetic data generation proved effective, achieving ~89% accuracy on unseen test scenarios.**  \n\nFor full details, check:\n- `Main_results_holdout_val.ipynb` (final results)  \n- `ablations/` (impact of feature selection methods)  \n\n---\n\n## 📌 Industry Relevance  \n\nThis research has **direct implications** for:  \n✔ **HR \u0026 Workforce Management** – Predict stress \u0026 reduce workplace accidents.  \n✔ **Occupational Health \u0026 Safety Teams** – Implement AI-driven monitoring.  \n✔ **Government \u0026 Policymakers** – Set data-driven workplace safety regulations.  \n✔ **AI \u0026 Data Science Practitioners** – Develop real-world stress detection models.  \n\n---\n\n## 📝 License  \n\nThis project is licensed under the [MIT License](LICENSE), allowing free use, modification, and distribution.\n\n---\n\n## 🤝 Contributing  \n\nContributions are welcome! To contribute:  \n1. Fork the repository.  \n2. Create a new branch (`feature-new-feature`).  \n3. Commit changes and open a pull request.  \n\n---\n\n## 📬 Contact  \n\n📌 **Collaborators:** Mohammad Junayed Hasan and Jannat Sultana\n\n📌 **Supervisors:** Dr. Sifat Momen (sifat.momen@northsouth.edu, https://scholar.google.com/citations?user=sGVZEaAAAAAJ), Ms. Silvia Ahmed (silvia.ahmed@northsouth.edu, https://scholar.google.com/citations?user=T5jK--YAAAAJ\u0026hl=en\u0026oi=ao)\n\n📌 **Emails:** junayedhasan100@gmail.com, jannatsultana187@gmail.com\n\n📌 **LinkedIn:** https://www.linkedin.com/in/mjhasan21/, https://www.linkedin.com/in/jannat-sultana/\n\nWe appreciate your interest in our research and welcome discussions, collaborations, and feedback! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunayed-hasan%2Foccupational-stress-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunayed-hasan%2Foccupational-stress-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunayed-hasan%2Foccupational-stress-ml/lists"}