DENS: A Dataset for Multi-class Emotion Analysis
Paper • 1910.11769 • Published
How to use fpianz/roberta-english-book-reviews-sentiment with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="fpianz/roberta-english-book-reviews-sentiment") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("fpianz/roberta-english-book-reviews-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("fpianz/roberta-english-book-reviews-sentiment")Three classes sentiment analysis (positive, negative, neutral)
Based on https://huggingface.co/j-hartmann/sentiment-roberta-large-english-3-classes
Fine-tuned using:
Performance for books:
Num examples = 1666
Batch size = 16
| precision | recall | f1-score | support | |
|---|---|---|---|---|
| Negative | 0.83 | 0.88 | 0.85 | 844 |
| Neutral | 0.68 | 0.51 | 0.58 | 351 |
| Positive | 0.79 | 0.85 | 0.82 | 471 |
| accuracy | 0.79 | 1666 | ||
| macro avg | 0.76 | 0.75 | 0.75 | 1666 |
| weighted avg | 0.78 | 0.79 | 0.78 | 1666 |
Performance for reviews:
Num examples = 205
Batch size = 16
| precision | recall | f1-score | support | |
|---|---|---|---|---|
| Negative | 0.89 | 0.92 | 0.91 | 26 |
| Neutral | 0.96 | 0.91 | 0.94 | 90 |
| Positive | 0.94 | 0.98 | 0.96 | 89 |
| accuracy | 0.94 | 205 | ||
| macro avg | 0.93 | 0.94 | 0.93 | 205 |
| weighted avg | 0.94 | 0.94 | 0.94 | 205 |