roberta-base_stress_classification
This model is a fine-tuned version of roberta-base on the glassdoor dataset based on 100000 employees' reviews. It achieves the following results on the evaluation set:
- Loss: 0.1800
- Accuracy: 0.9647
- F1: 0.9647
- Precision: 0.9647
- Recall: 0.9647
Training data
Training data was classified as follow:
class | Description |
---|---|
0 | Not Stressed |
1 | Stressed |
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 5
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
---|---|---|---|---|---|---|---|
0.704 | 1.0 | 8000 | 0.6933 | 0.5 | 0.3333 | 0.25 | 0.5 |
0.6926 | 2.0 | 16000 | 0.6980 | 0.5 | 0.3333 | 0.25 | 0.5 |
0.0099 | 3.0 | 24000 | 0.1800 | 0.9647 | 0.9647 | 0.9647 | 0.9647 |
0.2727 | 4.0 | 32000 | 0.2243 | 0.9526 | 0.9526 | 0.9527 | 0.9526 |
0.0618 | 5.0 | 40000 | 0.2128 | 0.9536 | 0.9536 | 0.9546 | 0.9536 |
Model performance
- | precision | recall | f1 | support |
---|---|---|---|---|
Not Stressed | 0.96 | 0.97 | 0.97 | 10000 |
Stressed | 0.97 | 0.96 | 0.97 | 10000 |
accuracy | 0.97 | 20000 | ||
macro avg | 0.97 | 0.97 | 0.97 | 20000 |
weighted avg | 0.97 | 0.97 | 0.97 | 20000 |
How to use roberta-base_topic_classification_nyt_news with HuggingFace
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("dstefa/roberta-base_topic_classification_nyt_news")
model = AutoModelForSequenceClassification.from_pretrained("dstefa/roberta-base_topic_classification_nyt_news")
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
text = "They also caused so much stress because some leaders valued optics over output."
pipe(text)
[{'label': 'Stressed', 'score': 0.9959163069725037}]
### Framework versions
- Transformers 4.32.1
- Pytorch 2.1.0+cu121
- Datasets 2.12.0
- Tokenizers 0.13.2
- Downloads last month
- 19
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for dstefa/roberta-base_stress_classification
Base model
FacebookAI/roberta-baseEvaluation results
- F1 on New_York_Times_Topicsself-reported0.970
- accuracy on New_York_Times_Topicsself-reported0.970
- precision on New_York_Times_Topicsself-reported0.970
- recall on New_York_Times_Topicsself-reported0.970