|
|
--- |
|
|
language: |
|
|
- id |
|
|
metrics: |
|
|
- accuracy |
|
|
- precision |
|
|
- recall |
|
|
- f1 |
|
|
base_model: |
|
|
- indobenchmark/indobert-base-p1 |
|
|
pipeline_tag: text-classification |
|
|
library_name: transformers |
|
|
tags: |
|
|
- NLP |
|
|
- indobert |
|
|
- sentimen |
|
|
--- |
|
|
|
|
|
# IndoBERT Sentiment Analysis Model |
|
|
|
|
|
Model ini adalah hasil fine-tuning model IndoBERT base untuk tugas klasifikasi sentimen bahasa Indonesia. |
|
|
|
|
|
## Penggunaan |
|
|
### Use a pipeline as a high-level helper |
|
|
from transformers import pipeline |
|
|
pipe = pipeline("text-classification", model="Ha1dir/sentimen-indobert") |
|
|
|
|
|
### Load model directly |
|
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
|
tokenizer = AutoTokenizer.from_pretrained("Ha1dir/sentimen-indobert") |
|
|
model = AutoModelForSequenceClassification.from_pretrained("Ha1dir/sentimen-indobert") |
|
|
|
|
|
|
|
|
## Label Kelas |
|
|
|
|
|
- 0: Positive |
|
|
- 1: Negative |
|
|
- 2: Neutral |
|
|
|
|
|
## Tentang Model |
|
|
|
|
|
- Base Model: indobenchmark/indobert-base-p1 |
|
|
- Training Epochs: 5 |
|
|
- Optimizer: Adam, LR = 3e-6 |
|
|
|
|
|
|
|
|
## Hasil Training |
|
|
(Epoch 1) TRAIN LOSS: 0.2962 |
|
|
Acc: 0.8896 |
|
|
Precision: 0.8893 |
|
|
Recall: 0.8896 |
|
|
F1: 0.8876 |
|
|
|
|
|
(Epoch 2) TRAIN LOSS: 0.1450 |
|
|
Acc: 0.9514 |
|
|
Precision: 0.9513 |
|
|
Recall: 0.9514 |
|
|
F1: 0.9513 |
|
|
|
|
|
(Epoch 3) TRAIN LOSS: 0.1053 |
|
|
Acc: 0.9646 |
|
|
Precision: 0.9646 |
|
|
Recall: 0.9646 |
|
|
F1: 0.9646 |
|
|
|
|
|
(Epoch 4) TRAIN LOSS: 0.0722 |
|
|
Acc: 0.9781 |
|
|
Precision: 0.9781 |
|
|
Recall: 0.9781 |
|
|
F1: 0.9781 |
|
|
|
|
|
(Epoch 5) TRAIN LOSS: 0.0468 |
|
|
Acc: 0.9874 |
|
|
Precision: 0.9874 |
|
|
Recall: 0.9874 |
|
|
F1: 0.9874 |
|
|
|
|
|
## Validasi Mode |
|
|
VAL LOSS: 0.0234 |
|
|
Acc: 0.9955 |
|
|
Precision: 0.9955 |
|
|
Recall: 0.9955 |
|
|
F1: 0.9954 |
|
|
|
|
|
## Evaluasi |
|
|
VAL LOSS: 0.0234 |
|
|
Acc: 0.9982 |
|
|
Precision: 0.9982 |
|
|
Recall: 0.9982 |
|
|
F1: 0.9982 |
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|