|
|
--- |
|
|
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`. |