Commit
·
3cb895b
1
Parent(s):
d817aa6
Update README.md
Browse files
README.md
CHANGED
@@ -18,13 +18,27 @@ should probably proofread and complete it, then remove this comment. -->
|
|
18 |
|
19 |
# bert-base-finance-sentiment-noisy-search
|
20 |
|
21 |
-
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on
|
22 |
-
|
23 |
-
-
|
24 |
-
-
|
25 |
-
-
|
26 |
-
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
## Model description
|
30 |
|
@@ -51,16 +65,6 @@ The following hyperparameters were used during training:
|
|
51 |
- lr_scheduler_type: linear
|
52 |
- num_epochs: 5
|
53 |
|
54 |
-
### Training results
|
55 |
-
|
56 |
-
| Training Loss | Epoch | Step | Validation Loss | F1 | Accuracy | Precision | Recall |
|
57 |
-
|:-------------:|:-----:|:----:|:---------------:|:------:|:--------:|:---------:|:------:|
|
58 |
-
| 0.4782 | 1.0 | 1022 | 0.4979 | 0.8357 | 0.8370 | 0.8376 | 0.8370 |
|
59 |
-
| 0.3233 | 2.0 | 2044 | 0.5273 | 0.8568 | 0.8571 | 0.8568 | 0.8571 |
|
60 |
-
| 0.1874 | 3.0 | 3066 | 0.6467 | 0.8531 | 0.8533 | 0.8534 | 0.8533 |
|
61 |
-
| 0.1048 | 4.0 | 4088 | 0.7924 | 0.8600 | 0.8598 | 0.8608 | 0.8598 |
|
62 |
-
| 0.0556 | 5.0 | 5110 | 0.8976 | 0.8595 | 0.8592 | 0.8600 | 0.8592 |
|
63 |
-
|
64 |
|
65 |
### Framework versions
|
66 |
|
|
|
18 |
|
19 |
# bert-base-finance-sentiment-noisy-search
|
20 |
|
21 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on Kaggle finance news sentiment analysis with data enhancement using noisy search. The process is explained below:
|
22 |
+
|
23 |
+
1. First "bert-base-uncased" was fine-tuned on Kaggle's finance news sentiment analysis https://www.kaggle.com/ankurzing/sentiment-analysis-for-financial-news dataset achieving accuracy of about 88%
|
24 |
+
2. We then used a logistic-regression classifier on the same data. Here we looked at coefficients that contributed the most to the "Positive" and "Negative" classes by inspecting only bi-grams.
|
25 |
+
3. Using the top 25 bi-grams per class (i.e. "Positive" / "Negative") we invoked Bing news search with those bi-grams and retrieved up to 50 news per bi-gram phrase.
|
26 |
+
4. We called it "noisy-search" because it is assumed the positive bi-grams (e.g. "profit rose" , "growth net") give rise to positive examples whereas negative bi-grams (e.g. "loss increase", "share loss") result in negative examples.
|
27 |
+
5. For each article we kept the title + excerpt and labeled it according to the noisy pre-assumption
|
28 |
+
6. We then trained the same model on the noisy data and apply it to an held-out test set from the original set split.
|
29 |
+
7. Training with couple of thousands noisy "positives" and "negatives" yielded a test set accuracy of about 95%.
|
30 |
+
|
31 |
+
Accuracy results for Logistic Regression (LR) and BERT (base-cased) are shown below
|
32 |
+
|
33 |
+
Accuracy | Kaggle | Enhanced noisy data set
|
34 |
+
LR | 79.0% | 95.1%
|
35 |
+
BERT | 88.7% | 95.2%
|
36 |
+
|
37 |
+
Here we describe the process in more detail alongside with other metrics - https://drive.google.com/file/d/1MI9gRdppactVZ_XvhCwvoaOV1aRfprrd/view?usp=sharing
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
|
43 |
## Model description
|
44 |
|
|
|
65 |
- lr_scheduler_type: linear
|
66 |
- num_epochs: 5
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
### Framework versions
|
70 |
|