Instructions to use risa-ai/sentiment-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use risa-ai/sentiment-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="risa-ai/sentiment-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("risa-ai/sentiment-v2") model = AutoModelForSequenceClassification.from_pretrained("risa-ai/sentiment-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
8a61036
1
Parent(s): adf098f
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- risa-ai/sentiment-v2
|
| 4 |
+
language:
|
| 5 |
+
- id
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
### Hyperparameters
|
| 9 |
+
|
| 10 |
+
```
|
| 11 |
+
"epochs": 32,
|
| 12 |
+
"learning_rate": 2e-5,
|
| 13 |
+
"batch_size_train": 24,
|
| 14 |
+
"batch_size_val": 16,
|
| 15 |
+
"max_len": 512,
|
| 16 |
+
"num_worker": 4,
|
| 17 |
+
"max_grad_norm": 5,
|
| 18 |
+
}
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
### Run Summary Logs
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
accuracy 0.8318462096481682
|
| 25 |
+
f1 0.8314074021814951
|
| 26 |
+
precision 0.7324855145009559
|
| 27 |
+
recall 0.7052524442856924
|
| 28 |
+
train_loss 0.006222551137038769
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
### Evaluation Result
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
precision recall f1-score support
|
| 35 |
+
|
| 36 |
+
confused 0.63 0.62 0.62 1170
|
| 37 |
+
negative 0.73 0.60 0.66 515
|
| 38 |
+
netral 0.89 0.90 0.89 9888
|
| 39 |
+
positive 0.70 0.70 0.70 2212
|
| 40 |
+
|
| 41 |
+
accuracy 0.83 13785
|
| 42 |
+
macro avg 0.73 0.70 0.72 13785
|
| 43 |
+
weighted avg 0.83 0.83 0.83 13785
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
### Confusion Matrix
|
| 48 |
+
|
| 49 |
+

|