ourafla/Mental-Health_Text-Classification_Dataset
Mental Health Text Classification Dataset (4-Class) Dataset Description This dataset contains short, user‑generated texts labeled for 4‑class mental health classification: Suicidal, Depression, Anxiety, and Normal. It is a derived dataset created by combining and cleaning three public mental‑health corpora, then re‑labeling them into a unified 4‑class scheme and exporting CSV files suitable for both classical ML and modern NLP models. The repository includes: An… See the full description on the dataset page: https://huggingface.co/datasets/ourafla/Mental-Health_Text-Classification_Dataset.
10443
1---2license: cc-by-4.03task_categories:4- text-classification5language:6- en7tags:8- text9- nlp10- classification11- suicide-prevention12- depression13- anxiety14- tabular15- mental-health16pretty_name: Mental Health Text Classification Dataset (4-Class)17size_categories:18- 10K<n<100K19configs:20- config_name: default21 data_files:22 - split: train23 path: "mental_heath_unbanlanced.csv"24 - split: test25 path: "mental_health_combined_test.csv"26 - split: features27 path: "mental_health_feature_engineered.csv"28---29 30 31# Mental Health Text Classification Dataset (4-Class)32 33## Dataset Description34 35This dataset contains short, user‑generated texts labeled for **4‑class mental health classification**: **Suicidal**, **Depression**, **Anxiety**, and **Normal**. It is a **derived dataset** created by combining and cleaning three public mental‑health corpora, then re‑labeling them into a unified 4‑class scheme and exporting CSV files suitable for both classical ML and modern NLP models.36 37The repository includes:38 39- An **unbalanced main training corpus** (realistic class skew). 40- A **strictly balanced test split** for fair evaluation. 41- A **feature‑engineered file** with basic text statistics (length, URLs, emojis, punctuation, etc.).42 43> **Important:** This dataset is intended for **research and education only**. It is not a clinical tool and must not be used for real‑world diagnosis, triage, or crisis intervention.44 45---46 47## Dataset Structure48 49### Files50 511. **`mental_heath_unbanlanced.csv`** 52 - Main training corpus with **48,945 samples** and a realistic, unbalanced class distribution (Normal, Depression, Suicidal, Anxiety).53 - Columns:54 - `text` – Cleaned post or statement text. 55 - `status` – Final label in {`Suicidal`, `Depression`, `Anxiety`, `Normal`}.56 572. **`mental_health_combined_test.csv`** 58 - **Balanced test split** with **992 samples** (exactly **248 per class**). 59 - Columns:60 - `text` – Cleaned post. 61 - `status` – Final 4‑class label. 62 - Built by combining held‑out data from the sources, applying the same cleaning and label mapping, removing duplicates, and **downsampling each class to equal size** for fair evaluation.633. **`mental_health_feature_engineered.csv`** 64 - Cleaned and **feature‑engineered** subset for classical models and analysis. 65 - Columns:66 - Core: `Unique_ID`, `text`, `status` (4‑class label). 67 - Features:68 - `text_length` – Number of characters. 69 - `word_count` – Number of whitespace‑separated tokens. 70 - `num_urls` – Count of URL patterns. 71 - `num_emojis` – Count of emoji characters. 72 - `num_special_chars` – Count of non‑alphanumeric characters. 73 - `num_excess_punct` – Count of repeated punctuation sequences (e.g., `!!!`, `???`, `...`). 74 - `avg_word_length` – Average characters per word.75 76### Splits77 78This repo is organized at the **file level** (no HF `train`/`test` config baked in). A common convention is:79 80- `mental_heath_unbanlanced.csv` → `train` (and derive your own validation split). 81- `mental_health_combined_test.csv` → `test`. 82 83Example with `datasets`:84 85from datasets import load_dataset86 87ds_train = load_dataset(88"your-username/Mental-Health_Text-Classification_Dataset",89data_files={"train": "mental_heath_unbanlanced.csv"},90)91 92ds_test = load_dataset(93"your-username/Mental-Health_Text-Classification_Dataset",94data_files={"test": "mental_health_combined_test.csv"},95)96 97print(ds_train)98print(ds_test)99 100text101 102For the feature file:103 104ds_fe = load_dataset(105"your-username/Mental-Health_Text-Classification_Dataset",106data_files={"feature": "mental_health_feature_engineered.csv"},107)108 109text110 111---112 113## Source Data and Provenance114 115This dataset does **not** collect new data from individuals. Instead, it is built by **downloading, cleaning, and merging** three existing public resources.[file:64][file:65]116 117**Source datasets:**118 119- **Suicide and Depression Detection (Kaggle)** – Nikhileswar Komati 120 Reddit posts from suicide‑related communities labeled as suicidal vs non‑suicidal / depression vs control. 121 https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch122 123- **Sentiment Analysis for Mental Health (Kaggle)** – Suchintika Sarkar 124 Short statements labeled as normal, depression, suicide, anxiety, stress, bipolarity, personality disorder, etc. 125 https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health126 127- **Reddit Mental Health Classification (Murarka et al.)** 128 Dataset released with *“Detection and Classification of Mental Illnesses on Social Media using RoBERTa.”* 129 Reddit posts labeled into ADHD, Anxiety, Bipolar, Depression, PTSD, and None. 130 https://github.com/amurark/mental-health-detection131 132Only the **processed, relabeled, and re‑split** samples are redistributed here. Users must obtain the original raw data from the links above if needed.133 134---135 136## Preprocessing and Label Mapping137 138### Cleaning139 140All source datasets are passed through a common cleaning pipeline:141 142- Drop rows with missing `text` or labels (`status`). 143- Deduplicate texts across and within sources. 144- Apply regex‑based text normalization (whitespace cleanup, formatting fixes). 145- Filter out extremely short and excessively long texts to remove non‑informative samples.146 147### Unified 4‑Class Labels148 149Original labels vary widely (suicide vs non, multiple disorders, control). They are mapped to a **four‑class scheme**:150 151- **Suicidal** – Posts explicitly labeled as suicide / suicidal ideation. 152- **Depression** – Posts labeled as depression / depressed. 153- **Anxiety** – Posts labeled with anxiety‑related categories. 154- **Normal** – Control / non‑suicide / normal posts.155 156Samples whose labels cannot be clearly mapped (e.g., stress, bipolar, personality disorder, PTSD, mixed or ambiguous labels) are **discarded** to keep the final label space clean.157 158### Splits and Balance159 160- The **main training file** (`mental_heath_unbanlanced.csv`) preserves the **natural class imbalance** after cleaning and mapping. 161- The **balanced test file** (`mental_health_combined_test.csv`) is created by:162 - Building a held‑out pool from the sources. 163 - Applying the same cleaning and label mapping. 164 - Removing duplicates. 165 - **Downsampling each class to 248 samples** for a total of 992 rows.166 167The feature‑engineered file is generated from the cleaned sentiment subset by adding the numerical text features listed above.168 169---170 171## Intended Uses172 173### Primary Uses174 175- Research and teaching on **mental‑health‑related text classification**. 176- Benchmarking binary or multi‑class classifiers (especially 4‑class). 177- Studying the impact of **class imbalance**, basic feature engineering, and model robustness on noisy social‑media text.178 179Typical tasks:180 181- 4‑way text classification: Suicidal vs Depression vs Anxiety vs Normal. 182- Ablation studies: raw text vs text + simple features (from the feature‑engineered file). 183- Transfer learning experiments on mental‑health Reddit data.184 185### Out‑of‑Scope Uses186 187- Clinical decision‑making, diagnosis, or risk assessment. 188- Any deployment that might influence real‑world medical, therapeutic, or crisis‑intervention workflows. 189- Individual‑level profiling, surveillance, or moderation without appropriate human review and safeguards.190 191---192 193## Ethical Considerations and Limitations194 195- **Non‑clinical labels:** Labels are derived from subreddit context and dataset creators’ heuristics, not formal diagnoses by clinicians.196- **Domain bias:** Content is mostly from Reddit and similar platforms; models may not generalize to clinical notes, private messages, or other domains. 197- **Demographic unknowns:** There is no reliable demographic metadata; potential demographic, cultural, or linguistic biases cannot be quantified.198- **No guarantee of harm‑free samples:** Text may contain distressing content, including mentions of self‑harm or suicide; users should handle and share it with care, especially in teaching settings.199 200Users are encouraged to:201 202- Use this dataset **only in controlled research/educational environments**. 203- Avoid building systems that auto‑label individual users in high‑stakes contexts without expert oversight. 204- Follow your institution’s ethics and IRB/IEC guidelines where applicable.205 206---207 208## Citation209 210Please cite the **original datasets** and this derived dataset.211 212**Original datasets**213 214- Komati, N. *Suicide and Depression Detection* \[Dataset\]. Kaggle. 215 https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch216 217- Sarkar, S. *Sentiment Analysis for Mental Health* \[Dataset\]. Kaggle. 218 https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health219 220- Murarka, A., Radhakrishnan, B., & Ravichandran, S. (2021). *Detection and Classification of Mental Illnesses on Social Media using RoBERTa* \[Dataset and code\]. GitHub. 221 https://github.com/amurark/mental-health-detection222 223**This derived dataset**224 225> Mukherjee, P. (2025). *Mental Health Text Classification Dataset (4‑Class)* \[Dataset\]. Hugging Face Hub. `https://huggingface.co/datasets/ourafla/Mental-Health_Text-Classification_Dataset`.