Datasets:
File size: 9,283 Bytes
c1bff1f c731dbd aca2244 e7763f7 aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 11da08f aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 0ff2abc aca2244 e47ef4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
---
license: cc-by-4.0
task_categories:
- text-classification
language:
- en
tags:
- text
- nlp
- classification
- suicide-prevention
- depression
- anxiety
- tabular
- mental-health
pretty_name: Mental Health Text Classification Dataset (4-Class)
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files:
- split: train
path: "mental_heath_unbanlanced.csv"
- split: test
path: "mental_health_combined_test.csv"
- split: features
path: "mental_health_feature_engineered.csv"
---
# 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 **unbalanced main training corpus** (realistic class skew).
- A **strictly balanced test split** for fair evaluation.
- A **feature‑engineered file** with basic text statistics (length, URLs, emojis, punctuation, etc.).
> **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.
---
## Dataset Structure
### Files
1. **`mental_heath_unbanlanced.csv`**
- Main training corpus with **48,945 samples** and a realistic, unbalanced class distribution (Normal, Depression, Suicidal, Anxiety).
- Columns:
- `text` – Cleaned post or statement text.
- `status` – Final label in {`Suicidal`, `Depression`, `Anxiety`, `Normal`}.
2. **`mental_health_combined_test.csv`**
- **Balanced test split** with **992 samples** (exactly **248 per class**).
- Columns:
- `text` – Cleaned post.
- `status` – Final 4‑class label.
- 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.
3. **`mental_health_feature_engineered.csv`**
- Cleaned and **feature‑engineered** subset for classical models and analysis.
- Columns:
- Core: `Unique_ID`, `text`, `status` (4‑class label).
- Features:
- `text_length` – Number of characters.
- `word_count` – Number of whitespace‑separated tokens.
- `num_urls` – Count of URL patterns.
- `num_emojis` – Count of emoji characters.
- `num_special_chars` – Count of non‑alphanumeric characters.
- `num_excess_punct` – Count of repeated punctuation sequences (e.g., `!!!`, `???`, `...`).
- `avg_word_length` – Average characters per word.
### Splits
This repo is organized at the **file level** (no HF `train`/`test` config baked in). A common convention is:
- `mental_heath_unbanlanced.csv` → `train` (and derive your own validation split).
- `mental_health_combined_test.csv` → `test`.
Example with `datasets`:
from datasets import load_dataset
ds_train = load_dataset(
"your-username/Mental-Health_Text-Classification_Dataset",
data_files={"train": "mental_heath_unbanlanced.csv"},
)
ds_test = load_dataset(
"your-username/Mental-Health_Text-Classification_Dataset",
data_files={"test": "mental_health_combined_test.csv"},
)
print(ds_train)
print(ds_test)
text
For the feature file:
ds_fe = load_dataset(
"your-username/Mental-Health_Text-Classification_Dataset",
data_files={"feature": "mental_health_feature_engineered.csv"},
)
text
---
## Source Data and Provenance
This 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]
**Source datasets:**
- **Suicide and Depression Detection (Kaggle)** – Nikhileswar Komati
Reddit posts from suicide‑related communities labeled as suicidal vs non‑suicidal / depression vs control.
https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch
- **Sentiment Analysis for Mental Health (Kaggle)** – Suchintika Sarkar
Short statements labeled as normal, depression, suicide, anxiety, stress, bipolarity, personality disorder, etc.
https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health
- **Reddit Mental Health Classification (Murarka et al.)**
Dataset released with *“Detection and Classification of Mental Illnesses on Social Media using RoBERTa.”*
Reddit posts labeled into ADHD, Anxiety, Bipolar, Depression, PTSD, and None.
https://github.com/amurark/mental-health-detection
Only the **processed, relabeled, and re‑split** samples are redistributed here. Users must obtain the original raw data from the links above if needed.
---
## Preprocessing and Label Mapping
### Cleaning
All source datasets are passed through a common cleaning pipeline:
- Drop rows with missing `text` or labels (`status`).
- Deduplicate texts across and within sources.
- Apply regex‑based text normalization (whitespace cleanup, formatting fixes).
- Filter out extremely short and excessively long texts to remove non‑informative samples.
### Unified 4‑Class Labels
Original labels vary widely (suicide vs non, multiple disorders, control). They are mapped to a **four‑class scheme**:
- **Suicidal** – Posts explicitly labeled as suicide / suicidal ideation.
- **Depression** – Posts labeled as depression / depressed.
- **Anxiety** – Posts labeled with anxiety‑related categories.
- **Normal** – Control / non‑suicide / normal posts.
Samples 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.
### Splits and Balance
- The **main training file** (`mental_heath_unbanlanced.csv`) preserves the **natural class imbalance** after cleaning and mapping.
- The **balanced test file** (`mental_health_combined_test.csv`) is created by:
- Building a held‑out pool from the sources.
- Applying the same cleaning and label mapping.
- Removing duplicates.
- **Downsampling each class to 248 samples** for a total of 992 rows.
The feature‑engineered file is generated from the cleaned sentiment subset by adding the numerical text features listed above.
---
## Intended Uses
### Primary Uses
- Research and teaching on **mental‑health‑related text classification**.
- Benchmarking binary or multi‑class classifiers (especially 4‑class).
- Studying the impact of **class imbalance**, basic feature engineering, and model robustness on noisy social‑media text.
Typical tasks:
- 4‑way text classification: Suicidal vs Depression vs Anxiety vs Normal.
- Ablation studies: raw text vs text + simple features (from the feature‑engineered file).
- Transfer learning experiments on mental‑health Reddit data.
### Out‑of‑Scope Uses
- Clinical decision‑making, diagnosis, or risk assessment.
- Any deployment that might influence real‑world medical, therapeutic, or crisis‑intervention workflows.
- Individual‑level profiling, surveillance, or moderation without appropriate human review and safeguards.
---
## Ethical Considerations and Limitations
- **Non‑clinical labels:** Labels are derived from subreddit context and dataset creators’ heuristics, not formal diagnoses by clinicians.
- **Domain bias:** Content is mostly from Reddit and similar platforms; models may not generalize to clinical notes, private messages, or other domains.
- **Demographic unknowns:** There is no reliable demographic metadata; potential demographic, cultural, or linguistic biases cannot be quantified.
- **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.
Users are encouraged to:
- Use this dataset **only in controlled research/educational environments**.
- Avoid building systems that auto‑label individual users in high‑stakes contexts without expert oversight.
- Follow your institution’s ethics and IRB/IEC guidelines where applicable.
---
## Citation
Please cite the **original datasets** and this derived dataset.
**Original datasets**
- Komati, N. *Suicide and Depression Detection* \[Dataset\]. Kaggle.
https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch
- Sarkar, S. *Sentiment Analysis for Mental Health* \[Dataset\]. Kaggle.
https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health
- Murarka, A., Radhakrishnan, B., & Ravichandran, S. (2021). *Detection and Classification of Mental Illnesses on Social Media using RoBERTa* \[Dataset and code\]. GitHub.
https://github.com/amurark/mental-health-detection
**This derived dataset**
> Mukherjee, P. (2025). *Mental Health Text Classification Dataset (4‑Class)* \[Dataset\]. Hugging Face Hub. `https://huggingface.co/datasets/ourafla/Mental-Health_Text-Classification_Dataset`. |