SkyWater21 commited on
Commit
e71069a
·
verified ·
1 Parent(s): 84cbbe4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -3
README.md CHANGED
@@ -1,3 +1,81 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - SkyWater21/lv_emotions
5
+ language:
6
+ - lv
7
+ base_model:
8
+ - google-bert/bert-base-multilingual-cased
9
+ ---
10
+ Fine-tuned [Multilingual BERT](https://huggingface.co/google-bert/bert-base-multilingual-cased) for multi-label emotion classification task.
11
+
12
+ Model was trained on [lv_emotions](https://huggingface.co/datasets/SkyWater21/lv_emotions) dataset. This dataset is Latvian translation of [GoEmotions](https://huggingface.co/datasets/go_emotions) and [Twitter Emotions](https://huggingface.co/datasets/SkyWater21/lv_twitter_emotions) dataset. Google Translate was used to generate the machine translation.
13
+
14
+ Original 26 emotions were mapped to 6 base emotions as per Dr. Ekman theory.
15
+
16
+ Labels predicted by classifier:
17
+ ```yaml
18
+ 0: anger
19
+ 1: disgust
20
+ 2: fear
21
+ 3: joy
22
+ 4: sadness
23
+ 5: surprise
24
+ 6: neutral
25
+ ```
26
+
27
+ Seed used for random number generator is 42:
28
+ ```python
29
+ def set_seed(seed=42):
30
+ random.seed(seed)
31
+ np.random.seed(seed)
32
+ torch.manual_seed(seed)
33
+ if torch.cuda.is_available():
34
+ torch.cuda.manual_seed_all(seed)
35
+ ```
36
+
37
+ Training parameters:
38
+ ```yaml
39
+ max_length: null
40
+ batch_size: 32
41
+ shuffle: True
42
+ num_workers: 4
43
+ pin_memory: False
44
+ drop_last: False
45
+ optimizer: adam
46
+ lr: 0.00001
47
+ weight_decay: 0
48
+ problem_type: multi_label_classification
49
+ num_epochs: 4
50
+ ```
51
+
52
+
53
+ Evaluation results on test split of [lv_go_emotions](https://huggingface.co/datasets/SkyWater21/lv_emotions/viewer/combined/lv_go_emotions_test)
54
+ | |Precision|Recall|F1-Score|Support|
55
+ |--------------|---------|------|--------|-------|
56
+ |anger | 0.50| 0.35| 0.41| 726|
57
+ |disgust | 0.44| 0.28| 0.35| 123|
58
+ |fear | 0.58| 0.47| 0.52| 98|
59
+ |joy | 0.80| 0.76| 0.78| 2104|
60
+ |sadness | 0.66| 0.41| 0.51| 379|
61
+ |surprise | 0.59| 0.55| 0.57| 677|
62
+ |neutral | 0.71| 0.43| 0.54| 1787|
63
+ |micro avg | 0.70| 0.55| 0.62| 5894|
64
+ |macro avg | 0.61| 0.46| 0.52| 5894|
65
+ |weighted avg | 0.69| 0.55| 0.61| 5894|
66
+ |samples avg | 0.58| 0.56| 0.57| 5894|
67
+
68
+ Evaluation results on test split of [lv_twitter_emotions](https://huggingface.co/datasets/SkyWater21/lv_emotions/viewer/combined/lv_twitter_emotions_test)
69
+ | |Precision|Recall|F1-Score|Support|
70
+ |--------------|---------|------|--------|-------|
71
+ |anger | 0.92| 0.88| 0.90| 12013|
72
+ |disgust | 0.90| 0.94| 0.92| 14117|
73
+ |fear | 0.82| 0.67| 0.74| 3342|
74
+ |joy | 0.88| 0.84| 0.86| 5913|
75
+ |sadness | 0.86| 0.75| 0.80| 4786|
76
+ |surprise | 0.94| 0.56| 0.70| 1510|
77
+ |neutral | 0.00| 0.00| 0.00| 0|
78
+ |micro avg | 0.90| 0.85| 0.87| 41681|
79
+ |macro avg | 0.76| 0.66| 0.70| 41681|
80
+ |weighted avg | 0.90| 0.85| 0.87| 41681|
81
+ |samples avg | 0.85| 0.85| 0.85| 41681|