Mustafa Mohamed
commited on
Commit
·
f0ef3b5
1
Parent(s):
e58cea9
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,40 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
tags:
|
4 |
+
- sentiment
|
5 |
+
- sentiment-analysis
|
6 |
+
- financial
|
7 |
+
- fine-tuned
|
8 |
+
- fine-tuned-bert
|
9 |
+
- bert-uncased
|
10 |
---
|
11 |
+
|
12 |
+
### Model Overview:
|
13 |
+
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:
|
14 |
+
|
15 |
+
**financial_phrasebank accuracy:** 0.993
|
16 |
+
**auditor_senitment accuracy:** 0.974
|
17 |
+
|
18 |
+
### Training Hyperparameters:
|
19 |
+
|
20 |
+
**Learning Rate:** 2e-05
|
21 |
+
**Train Batch Size:** 16
|
22 |
+
**Eval Batch Size:** 16
|
23 |
+
**Random Seed:** 42
|
24 |
+
**Optimizer:** AdamW-betas(0.9, 0.999)
|
25 |
+
**Learning Rate Scheduler:** Linear
|
26 |
+
**Number of Epochs:** 6
|
27 |
+
**Number of Warmup Steps:** 0.2 * Number of Training Steps
|
28 |
+
|
29 |
+
### How To Use:
|
30 |
+
|
31 |
+
```
|
32 |
+
>> from transformers import pipeline
|
33 |
+
>> pipe = pipeline("sentiment-analysis", model="mstafam/fine-tuned-bert-financial-sentimental-analysis")
|
34 |
+
|
35 |
+
>> text = "Example company has seen a 5% increase in revenue this quarter."
|
36 |
+
|
37 |
+
>> pipe(text)
|
38 |
+
|
39 |
+
[{'label': 'Positive', 'score': 0.9993795156478882}]
|
40 |
+
```
|