Mental Health Emotion Detection - Logistic Regression
This model performs multi-label emotion classification for mental health applications, detecting 28 different emotions from text input.
Model Description
- Model Type: Logistic Regression (Multi-Output Classifier)
- Framework: scikit-learn
- Task: Multi-label emotion classification
- Dataset: GoEmotions (balanced subset)
- Languages: English
Performance
| Metric | Score |
|---|---|
| F1-Score | 0.298 |
| Precision | 0.219 |
| Recall | 0.508 |
| Accuracy | 90.1% |
Emotions Detected
The model can detect 28 emotions: admiration, amusement, anger, annoyance, approval, caring, confusion, curiosity, desire, disappointment, disapproval, disgust, embarrassment, excitement, fear, gratitude, grief, joy, love, nervousness, optimism, pride, realization, relief, remorse, sadness, surprise, neutral.
Usage
import pickle
import requests
# Using HuggingFace Inference API
API_URL = "https://api-inference.huggingface.co/models/YOUR_USERNAME/mental-health-logistic-regression"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
# Example usage
result = query({"inputs": "I'm feeling really anxious about tomorrow"})
print(result)
Training Details
- Training Data: Balanced GoEmotions dataset (~15,000 samples)
- Features: TF-IDF vectorization
- Preprocessing: Contraction expansion, lowercase normalization
- Class Balancing: Advanced sampling techniques for rare emotions
Intended Use
This model is designed for mental health applications, chatbots, and emotion-aware systems. It provides high recall for detecting emotional states that might require support or intervention.
Limitations
- Trained primarily on English text
- Performance may vary with informal language or slang
- Should not be used as sole diagnostic tool for mental health
Citation
If you use this model, please cite:
@misc{mental-health-emotion-logistic,
title={Mental Health Emotion Detection - Logistic Regression},
author={Your Name},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/YOUR_USERNAME/mental-health-logistic-regression}
}
- Downloads last month
- 7