File size: 1,254 Bytes
3167b3f f0ef3b5 3167b3f f0ef3b5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
---
license: mit
tags:
- sentiment
- sentiment-analysis
- financial
- fine-tuned
- fine-tuned-bert
- bert-uncased
---
### Model Overview:
This NLP model is fine-tuned with a focus on analyzing sentiment in financial text and news headlines. It was trained using the [bert-base-uncased](https://huggingface.co/bert-base-uncased) model on the [financial_phrasebank](https://huggingface.co/datasets/financial_phrasebank) and [auditor_sentiment](https://huggingface.co/datasets/FinanceInc/auditor_sentiment) datasets. It achieves the following accuracies in the trained datasets:
**financial_phrasebank accuracy:** 0.993
**auditor_senitment accuracy:** 0.974
### Training Hyperparameters:
**Learning Rate:** 2e-05
**Train Batch Size:** 16
**Eval Batch Size:** 16
**Random Seed:** 42
**Optimizer:** AdamW-betas(0.9, 0.999)
**Learning Rate Scheduler:** Linear
**Number of Epochs:** 6
**Number of Warmup Steps:** 0.2 * Number of Training Steps
### How To Use:
```
>> from transformers import pipeline
>> pipe = pipeline("sentiment-analysis", model="mstafam/fine-tuned-bert-financial-sentimental-analysis")
>> text = "Example company has seen a 5% increase in revenue this quarter."
>> pipe(text)
[{'label': 'Positive', 'score': 0.9993795156478882}]
``` |