Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- ru
|
| 4 |
tags:
|
| 5 |
- text-classification
|
| 6 |
- multi-label-classification
|
|
@@ -15,13 +15,13 @@ metrics:
|
|
| 15 |
|
| 16 |
# Russian Emotion Classifier
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
-
**
|
| 22 |
**F1-micro**: `0.7247` | **F1-macro**: `0.6823`
|
| 23 |
|
| 24 |
-
##
|
| 25 |
|
| 26 |
```python
|
| 27 |
from transformers import pipeline
|
|
@@ -38,26 +38,45 @@ for r in sorted(results, key=lambda x: -x["score"]):
|
|
| 38 |
print(r["label"], round(r["score"], 3))
|
| 39 |
```
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
|
| 44 |
-
|--------
|
| 45 |
| F1 micro | 0.7247 |
|
| 46 |
| F1 macro | 0.6823 |
|
| 47 |
| F1 weighted | 0.7389 |
|
| 48 |
| Precision micro | 0.6193 |
|
| 49 |
| Recall micro | 0.8733 |
|
| 50 |
|
| 51 |
-
###
|
| 52 |
|
| 53 |
-
|
|
| 54 |
-
|-------|----|
|
| 55 |
| joy | 0.8391 |
|
| 56 |
| sadness | 0.8057 |
|
| 57 |
| surprise | 0.6711 |
|
| 58 |
| fear | 0.6488 |
|
| 59 |
| anger | 0.4468 |
|
| 60 |
|
| 61 |
-
##
|
| 62 |
|
| 63 |
`joy` · `sadness` · `surprise` · `fear` · `anger`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
+
language: ru
|
|
|
|
| 4 |
tags:
|
| 5 |
- text-classification
|
| 6 |
- multi-label-classification
|
|
|
|
| 15 |
|
| 16 |
# Russian Emotion Classifier
|
| 17 |
|
| 18 |
+
A multi-label emotion classifier for Russian texts.
|
| 19 |
+
Trained on the [CEDR](https://huggingface.co/datasets/sagteam/cedr_v1) dataset with weighted BCE loss to handle class imbalance.
|
| 20 |
|
| 21 |
+
**Base model**: `cointegrated/rubert-tiny2`
|
| 22 |
**F1-micro**: `0.7247` | **F1-macro**: `0.6823`
|
| 23 |
|
| 24 |
+
## Usage
|
| 25 |
|
| 26 |
```python
|
| 27 |
from transformers import pipeline
|
|
|
|
| 38 |
print(r["label"], round(r["score"], 3))
|
| 39 |
```
|
| 40 |
|
| 41 |
+
Example output:
|
| 42 |
+
```
|
| 43 |
+
joy 0.892
|
| 44 |
+
fear 0.678
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Metrics
|
| 48 |
|
| 49 |
+
| Metric | Value |
|
| 50 |
+
|--------|-------|
|
| 51 |
| F1 micro | 0.7247 |
|
| 52 |
| F1 macro | 0.6823 |
|
| 53 |
| F1 weighted | 0.7389 |
|
| 54 |
| Precision micro | 0.6193 |
|
| 55 |
| Recall micro | 0.8733 |
|
| 56 |
|
| 57 |
+
### Per-class F1
|
| 58 |
|
| 59 |
+
| Class | F1 |
|
| 60 |
+
|-------|-----|
|
| 61 |
| joy | 0.8391 |
|
| 62 |
| sadness | 0.8057 |
|
| 63 |
| surprise | 0.6711 |
|
| 64 |
| fear | 0.6488 |
|
| 65 |
| anger | 0.4468 |
|
| 66 |
|
| 67 |
+
## Labels
|
| 68 |
|
| 69 |
`joy` · `sadness` · `surprise` · `fear` · `anger`
|
| 70 |
+
|
| 71 |
+
## Citation
|
| 72 |
+
|
| 73 |
+
If you use this model in your research, please cite:
|
| 74 |
+
|
| 75 |
+
```bibtex
|
| 76 |
+
@dataset{cedr_v1,
|
| 77 |
+
author = {SAGTeam},
|
| 78 |
+
title = {CEDR: Russian Emotion Dataset},
|
| 79 |
+
year = {2023},
|
| 80 |
+
url = {https://huggingface.co/datasets/sagteam/cedr_v1}
|
| 81 |
+
}
|
| 82 |
+
```
|