File size: 1,594 Bytes
5f601d6 7ed447f 5f601d6 7ed447f 27daaef 7ed447f 5f601d6 b878213 5f601d6 c40b512 b878213 5f601d6 cc1e528 f50c3de 9e109ce |
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 |
---
language: en
tags:
- emotion-classification
- text-classification
- distilbert
datasets:
- dair-ai/emotion
metrics:
- accuracy
---
# Emotion Classification Model
## Model Description
This model fine-tunes DistilBERT for a multi-class emotion classification task. The dataset that is used is dair-ai/emotion containing six emotion classes: sadness, joy, love, anger, fear and suprise
## Training and Evaluation
- Training Dataset: dair-ai/emotion (16,000 examples)
- Validation Dataset: dair-ai/emotion (2,000 examples)
- Validation Accuracy: 96.6 %
- Training Time: 18,078.18s (5h 1m 18s)
## Hyperparameters
- Learning Rate: 5e-5
- Batch Size: 16
- Epochs: 4
- Weight Decay: 0.01
## Usage
```python
from transformers import pipeline
classifier = pipeline("text-classification",
model="your-username/emotion-classification-model")
text = "I’m so happy today!"
result = classifier(text)
print(result)
# Output: [{'label': 'LABEL_1', 'score': 0.9996680021286011}] ; which corresponds to 'joy' with a 99.9% accuracy
```
## Limitations
- Performance on Non-English Texts: The model works best with English texts. It may not handle other languages or regional dialects.
- Bias From Training Data: Reflects patterns from the training data, which may not cover all cases it could see. May lead to unfair predictns
- Issues with Sarcasm and Complex Language: Model might misinterpret sarcasm or subtle language, ex, "Great product... not!"
- No Confidence Scores: Model does not judge it's own output, so need some form of double check system, ie. yourself
## License
The MIT License (MIT)
|