SkyWater21
commited on
Commit
·
f144736
1
Parent(s):
79fed26
Update README.md
Browse files
README.md
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- SkyWater21/lv_go_emotions
|
5 |
+
language:
|
6 |
+
- lv
|
7 |
+
---
|
8 |
+
Fine-tuned [multilingual BERT](https://huggingface.co/google-bert/bert-base-multilingual-cased) for multi-label emotion classification task.
|
9 |
+
|
10 |
+
Model was trained on [lv_go_emotions](https://huggingface.co/datasets/SkyWater21/lv_go_emotions) dataset. This dataset is Latvian translation of [GoEmotions](https://huggingface.co/datasets/go_emotions) dataset. Google Translate was used to generate the machine translation.
|
11 |
+
|
12 |
+
Original 26 emotions were mapped to 6 base emotions as per Dr. Ekman theory.
|
13 |
+
|
14 |
+
Labels predicted by classifier:
|
15 |
+
```yaml
|
16 |
+
0: anger
|
17 |
+
1: disgust
|
18 |
+
2: fear
|
19 |
+
3: joy
|
20 |
+
4: sadness
|
21 |
+
5: surprise
|
22 |
+
6: neutral
|
23 |
+
```
|
24 |
+
|
25 |
+
Label mapping from 27 emotions from GoEmotion to 6 base emotions as per Dr. Ekman theory:
|
26 |
+
|GoEmotion|Ekman|
|
27 |
+
|---|---|
|
28 |
+
| admiration | joy|
|
29 |
+
| amusement | joy|
|
30 |
+
| anger | anger|
|
31 |
+
| annoyance | anger|
|
32 |
+
| approval | joy|
|
33 |
+
| caring | joy|
|
34 |
+
| confusion | surprise|
|
35 |
+
| curiosity | surprise|
|
36 |
+
| desire | joy|
|
37 |
+
| disappointment | sadness|
|
38 |
+
| disapproval | anger|
|
39 |
+
| disgust | disgust|
|
40 |
+
| embarrassment | sadness|
|
41 |
+
| excitement | joy|
|
42 |
+
| fear | fear|
|
43 |
+
| gratitude | joy|
|
44 |
+
| grief | sadness|
|
45 |
+
| joy | joy|
|
46 |
+
| love | joy|
|
47 |
+
| nervousness | fear|
|
48 |
+
| optimism | joy|
|
49 |
+
| pride | joy|
|
50 |
+
| realization | surprise|
|
51 |
+
| relief | joy|
|
52 |
+
| remorse | sadness|
|
53 |
+
| sadness | sadness|
|
54 |
+
| surprise | surprise|
|
55 |
+
| neutral | neutral|
|
56 |
+
|
57 |
+
Seed used for random number generator is 42:
|
58 |
+
```python
|
59 |
+
def set_seed(seed=42):
|
60 |
+
random.seed(seed)
|
61 |
+
np.random.seed(seed)
|
62 |
+
torch.manual_seed(seed)
|
63 |
+
if torch.cuda.is_available():
|
64 |
+
torch.cuda.manual_seed_all(seed)
|
65 |
+
```
|
66 |
+
|
67 |
+
Training parameters:
|
68 |
+
```yaml
|
69 |
+
max_length: null
|
70 |
+
batch_size: 64
|
71 |
+
shuffle: True
|
72 |
+
num_workers: 8
|
73 |
+
pin_memory: False
|
74 |
+
drop_last: False
|
75 |
+
optimizer: adam
|
76 |
+
lr: 0.00001
|
77 |
+
weight_decay: 0
|
78 |
+
|
79 |
+
problem_type: multi_label_classification
|
80 |
+
|
81 |
+
num_epochs: 45
|
82 |
+
```
|
83 |
+
|
84 |
+
|
85 |
+
Evaluation results on test split of [lv_go_emotions](https://huggingface.co/datasets/SkyWater21/lv_go_emotions/viewer/simplified_ekman)
|
86 |
+
| |Precision|Recall|F1-Score|AUC-ROC|Support|
|
87 |
+
|--------------|---------|------|--------|-------|-------|
|
88 |
+
|anger | 0.58| 0.36| 0.45| 0.83| 726|
|
89 |
+
|disgust | 0.88| 0.12| 0.21| 0.90| 123|
|
90 |
+
|fear | 0.75| 0.48| 0.58| 0.93| 98|
|
91 |
+
|joy | 0.82| 0.76| 0.79| 0.90| 2104|
|
92 |
+
|sadness | 0.69| 0.46| 0.55| 0.88| 379|
|
93 |
+
|surprise | 0.61| 0.51| 0.55| 0.87| 677|
|
94 |
+
|neutral | 0.65| 0.62| 0.64| 0.83| 1787|
|
95 |
+
|micro avg | 0.71| 0.60| 0.65| 0.92| 5894|
|
96 |
+
|macro avg | 0.71| 0.47| 0.54| 0.88| 5894|
|
97 |
+
|weighted avg | 0.71| 0.60| 0.64| 0.87| 5894|
|
98 |
+
|samples avg | 0.63| 0.62| 0.62| nan| 5894|
|