StevenLimcorn
commited on
Commit
•
85544c7
1
Parent(s):
77d1188
Create README
Browse files
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: id
|
3 |
+
tags:
|
4 |
+
- roberta
|
5 |
+
license: mit
|
6 |
+
datasets:
|
7 |
+
- indonlu
|
8 |
+
widget:
|
9 |
+
- text: "Hal-hal baik akan datang."
|
10 |
+
---
|
11 |
+
|
12 |
+
## Indo-roberta-emotion-classifier
|
13 |
+
|
14 |
+
Indo-roberta-emotion-classifier is emotion classifier based on [Indo-roberta](https://huggingface.co/flax-community/indonesian-roberta-base) model. It was trained on the trained on [IndoNLU EmoT](https://huggingface.co/datasets/indonlu) dataset. The model used was [Indo-roberta](https://huggingface.co/flax-community/indonesian-roberta-base) and was transfer-learned to an emotion classifier model. Based from the [IndoNLU bencmark](https://www.indobenchmark.com/), the model achieve an f1-macro of 72.05%, accuracy of 71.81%, precision of 72.47% and recall of 71.94%.
|
15 |
+
|
16 |
+
## Model
|
17 |
+
|
18 |
+
The model was trained on 7 epochs with learning rate 2e-5. Achieved different metrics as shown below.
|
19 |
+
|
20 |
+
| Epoch | Training Loss | Validation Loss | Accuracy | F1 | Precision | Recall |
|
21 |
+
|-------|---------------|-----------------|----------|----------|-----------|----------|
|
22 |
+
| 1 | 1.300700 | 1.005149 | 0.622727 | 0.601846 | 0.640845 | 0.611144 |
|
23 |
+
| 2 | 0.806300 | 0.841953 | 0.686364 | 0.694096 | 0.701984 | 0.696657 |
|
24 |
+
| 3 | 0.591900 | 0.796794 | 0.686364 | 0.696573 | 0.707520 | 0.691671 |
|
25 |
+
| 4 | 0.441200 | 0.782094 | 0.722727 | 0.724359 | 0.725985 | 0.730229 |
|
26 |
+
| 5 | 0.334700 | 0.809931 | 0.711364 | 0.720550 | 0.718318 | 0.724608 |
|
27 |
+
| 6 | 0.268400 | 0.812771 | 0.718182 | 0.724192 | 0.721222 | 0.729195 |
|
28 |
+
| 7 | 0.226000 | 0.828461 | 0.725000 | 0.733625 | 0.731709 | 0.735800 |
|
29 |
+
|
30 |
+
## How to Use
|
31 |
+
### As Text Classifier
|
32 |
+
```python
|
33 |
+
from transformers import pipeline
|
34 |
+
pretrained_name = "StevenLimcorn/indonesian-roberta-base-emotion-classifier"
|
35 |
+
nlp = pipeline(
|
36 |
+
"sentiment-analysis",
|
37 |
+
model=pretrained_name,
|
38 |
+
tokenizer=pretrained_name
|
39 |
+
)
|
40 |
+
nlp("Hal-hal baik akan datang.")
|
41 |
+
```
|
42 |
+
## Disclaimer
|
43 |
+
Do consider the biases which come from both the pre-trained RoBERTa model and the `EmoT` dataset that may be carried over into the results of this model.
|
44 |
+
## Author
|
45 |
+
Indonesian RoBERTa Base Sentiment Classifier was trained and evaluated by [Steven Limcorn](https://github.com/stevenlimcorn). All computation and development are done on Google Colaboratory using their free GPU access.
|