cjvt
/

matejklemen commited on
Commit
b568522
·
1 Parent(s): 5051d7c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md CHANGED
@@ -1,3 +1,82 @@
1
  ---
2
  license: cc-by-sa-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-sa-4.0
3
+ datasets:
4
+ - cjvt/sentinews
5
+ language:
6
+ - sl
7
+ library_name: transformers
8
+ pipeline_tag: text-classification
9
+ model-index:
10
+ - name: sloberta-sentinews-sentence
11
+ results:
12
+ - task:
13
+ type: text-classification
14
+ name: Sentiment classification
15
+ dataset:
16
+ type: cjvt/sentinews
17
+ name: SentiNews
18
+ config: sentence_level
19
+ metrics:
20
+ - type: f1
21
+ value: 0.6934678744913757
22
+ name: Validation macro F1
23
+
24
  ---
25
+
26
+ # sloberta-sentinews-sentence
27
+
28
+ Slovenian 3-class sentiment classifier - [SloBERTa](https://huggingface.co/EMBEDDIA/sloberta) fine-tuned on the sentence-level config of the
29
+ SentiNews dataset.
30
+
31
+ The model is intended as:
32
+ (1) an out-of-the box sentence-level sentiment classifier or
33
+ (2) a sentence-level sentiment classification baseline.
34
+
35
+ ## Fine-tuning details
36
+ The model was fine-tuned on a random 90%/5%/5% train-val-test split of the `sentence_level` configuration of the [cjvt/sentinews](https://huggingface.co/datasets/cjvt/sentinews) dataset
37
+ using the following hyperparameters:
38
+ ```
39
+ max_length = 79 # 99th percentile of encoded training sequences, sequences are padded/truncated to this length
40
+ batch_size = 128
41
+ optimizer = "adamw_torch"
42
+ learning_rate = 2e-5
43
+ num_epochs = 10
44
+ validation_metric = "macro_f1"
45
+ ```
46
+
47
+ Feel free to inspect `training_args.bin` for more details.
48
+
49
+ If you wish to directly compare your model to this one, you should use the same split as this model. To do so, use the following code:
50
+ ```python
51
+ import json
52
+ import datasets
53
+
54
+ # You can find split_indices.json in the 'Files and versions' tab
55
+ with open("split_indices.json", "r") as f_split:
56
+ split = json.load(f_split)
57
+
58
+ data = datasets.load_dataset("cjvt/sentinews", "sentence_level", split="train")
59
+ train_data = data.select(split["train_indices"])
60
+ dev_data = data.select(split["dev_indices"])
61
+ test_data = data.select(split["test_indices"])
62
+ ```
63
+
64
+ ## Evaluation results
65
+
66
+ Best validation results:
67
+ ```
68
+ {
69
+ "eval_accuracy": 0.7207815275310835,
70
+ "eval_f1_macro": 0.6934678744913757,
71
+ "eval_f1_negative": 0.7042136003337507,
72
+ "eval_f1_neutral": 0.759215853398679,
73
+ "eval_f1_positive": 0.6169741697416974,
74
+ "eval_loss": 0.6337869167327881,
75
+ "eval_precision_negative": 0.6685148514851486,
76
+ "eval_precision_neutral": 0.7752393385552655,
77
+ "eval_precision_positive": 0.6314199395770392,
78
+ "eval_recall_negative": 0.74394006170119,
79
+ "eval_recall_neutral": 0.7438413361169103,
80
+ "eval_recall_positive": 0.6031746031746031
81
+ }
82
+ ```