dair-ai/emotion
Viewer β’ Updated β’ 437k β’ 33.7k β’ 441
This model combines BERT architecture with Reinforcement Learning (RL) for emotion classification. Initially fine-tuned on the dair-ai/emotion dataset (20k English sentences with 6 emotions), we then applied PPO reinforcement learning to optimize prediction behavior.
Supervised Phase:
RL Phase:
+1.0 for correct, -0.1 for incorrect predictions| Metric | Pre-RL | Post-RL | Ξ |
|---|---|---|---|
| Accuracy | 0.9205 | 0.931 | +1.14% |
| F1-Score | 0.9227 | 0.9298 | +0.77% |
| Precision | 0.9325 | 0.9305 | -0.21% |
| Recall | 0.9205 | 0.931 | +1.14% |
Key observation: RL fine-tuning provided modest but consistent improvements across most metrics, particularly in recall.
from transformers import pipeline
# Load from your repository
classifier = pipeline("text-classification",
model="SimoGiuffrida/SentimentRL",
tokenizer="bert-base-uncased")
results = classifier("I'm thrilled about this new opportunity!")
For full training details and analysis, visit the GitHub repository.