Downloads · 30 days
9
3% of all-time downloads
abdelrahmane01/SentimentAnalysis-distilbert-base-uncased-finetuned-emotion
SentimentAnalysis-distilbert-base-uncased-finetuned-emotion is a text classification model from abdelrahmane01. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of distilbert-base-uncased for emotion classification of short texts (tweets). It predicts one of six emotions:
Downloads · 30 days
9
3% of all-time downloads
All-time downloads
309
Public
Parameters
67M
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased for emotion classification of short texts (tweets).
It predicts one of six emotions:
The model was trained using the 🤗 Transformers Trainer API with class-weighted loss to handle class imbalance.
Evaluation results on the test set:
Note: F1 Macro is the primary metric since the dataset is imbalanced.
This model is suitable for:
The model was trained on an emotion-labeled tweet dataset with six emotion classes.
The dataset was split into training, validation, and test sets.
Preprocessing steps included:
ClassLabel| Training Loss | Epoch | Step | Validation Loss | F1 Macro | Accuracy |
|---|---|---|---|---|---|
| 0.6445 | 1.0 | 500 | 0.2374 | 0.8993 | 0.9235 |
| 0.1811 | 2.0 | 1000 | 0.1683 | 0.9109 | 0.9340 |
| 0.1357 | 3.0 | 1500 | 0.1686 | 0.9157 | 0.9380 |
| 0.1036 | 4.0 | 2000 | 0.1737 | 0.9192 | 0.9400 |
| 0.0816 | 5.0 | 2500 | 0.2204 | 0.9086 | 0.9345 |
| 0.0629 | 6.0 | 3000 | 0.2197 | 0.9142 | 0.9385 |
| 0.0475 | 7.0 | 3500 | 0.3064 | 0.9081 | 0.9355 |
The best model was selected based on macro F1 score.
Training and evaluation code is available on GitHub:
👉 https://github.com/Abdelrahmanemam01/Sentiment-Analysis