|
|
--- |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- generated_from_trainer |
|
|
metrics: |
|
|
- accuracy |
|
|
- f1 |
|
|
- recall |
|
|
- precision |
|
|
model-index: |
|
|
- name: fnet-large-Financial_Sentiment_Analysis_v3 |
|
|
results: [] |
|
|
language: |
|
|
- en |
|
|
pipeline_tag: text-classification |
|
|
--- |
|
|
|
|
|
# fnet-large-Financial_Sentiment_Analysis_v3 |
|
|
|
|
|
This model is a fine-tuned version of [google/fnet-large](https://huggingface.co/google/fnet-large). |
|
|
It achieves the following results on the evaluation set: |
|
|
- Loss: 0.4741 |
|
|
- Accuracy: 0.8248 |
|
|
- F1 |
|
|
- Weighted: 0.8194 |
|
|
- Micro: 0.8248 |
|
|
- Macro: 0.7369 |
|
|
- Recall |
|
|
- Weighted: 0.8248 |
|
|
- Micro: 0.8248 |
|
|
- Macro: 0.7269 |
|
|
- Precision |
|
|
- Weighted: 0.8163 |
|
|
- Micro: 0.8248 |
|
|
- Macro: 0.7515 |
|
|
|
|
|
## Model description |
|
|
|
|
|
This is a sentiment analysis (text classification) model concerning comments about finances. |
|
|
|
|
|
For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Sentiment%20Analysis/Financial%20Sentiment%20Analysis/Financial_Sentiment_Analysis_v3.ipynb |
|
|
|
|
|
## Intended uses & limitations |
|
|
|
|
|
This model is intended to demonstrate my ability to solve a complex problem using technology. |
|
|
|
|
|
## Training and evaluation data |
|
|
|
|
|
Dataset Sources: |
|
|
- https://www.kaggle.com/datasets/sbhatti/financial-sentiment-analysis |
|
|
- https://www.kaggle.com/datasets/ankurzing/sentiment-analysis-for-financial-news |
|
|
|
|
|
## Training procedure |
|
|
|
|
|
### Training hyperparameters |
|
|
|
|
|
The following hyperparameters were used during training: |
|
|
- learning_rate: 2e-05 |
|
|
- train_batch_size: 64 |
|
|
- eval_batch_size: 64 |
|
|
- seed: 42 |
|
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
|
- lr_scheduler_type: linear |
|
|
- num_epochs: 10 |
|
|
|
|
|
### Training results |
|
|
|
|
|
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 | Weighted Recall | Micro Recall | Macro Recall | Weighted Precision | Micro Precision | Macro Precision | |
|
|
|:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:--------:|:---------------:|:------------:|:------------:|:------------------:|:---------------:|:---------------:| |
|
|
| 0.6757 | 1.0 | 134 | 0.5890 | 0.5855 | 0.4739 | 0.5855 | 0.3628 | 0.5855 | 0.5855 | 0.4298 | 0.5912 | 0.5855 | 0.5210 | |
|
|
| 0.4815 | 2.0 | 268 | 0.3994 | 0.7827 | 0.7789 | 0.7827 | 0.7156 | 0.7827 | 0.7827 | 0.7039 | 0.7878 | 0.7827 | 0.7388 | |
|
|
| 0.314 | 3.0 | 402 | 0.3560 | 0.7991 | 0.7977 | 0.7991 | 0.7368 | 0.7991 | 0.7991 | 0.7252 | 0.8101 | 0.7991 | 0.7612 | |
|
|
| 0.235 | 4.0 | 536 | 0.3278 | 0.8201 | 0.8217 | 0.8201 | 0.7549 | 0.8201 | 0.8201 | 0.7509 | 0.8274 | 0.8201 | 0.7631 | |
|
|
| 0.1986 | 5.0 | 670 | 0.3574 | 0.8618 | 0.8655 | 0.8618 | 0.8209 | 0.8618 | 0.8618 | 0.8401 | 0.8723 | 0.8618 | 0.8084 | |
|
|
| 0.1605 | 6.0 | 804 | 0.3886 | 0.7995 | 0.7803 | 0.7995 | 0.6588 | 0.7995 | 0.7995 | 0.6469 | 0.7781 | 0.7995 | 0.6987 | |
|
|
| 0.1436 | 7.0 | 938 | 0.4040 | 0.8230 | 0.8207 | 0.8230 | 0.7442 | 0.8230 | 0.8230 | 0.7336 | 0.8210 | 0.8230 | 0.7576 | |
|
|
| 0.1373 | 8.0 | 1072 | 0.4517 | 0.8169 | 0.8076 | 0.8169 | 0.7123 | 0.8169 | 0.8169 | 0.7020 | 0.8030 | 0.8169 | 0.7323 | |
|
|
| 0.1271 | 9.0 | 1206 | 0.4533 | 0.8070 | 0.7945 | 0.8070 | 0.6892 | 0.8070 | 0.8070 | 0.6768 | 0.7906 | 0.8070 | 0.7169 | |
|
|
| 0.1199 | 10.0 | 1340 | 0.4741 | 0.8248 | 0.8194 | 0.8248 | 0.7369 | 0.8248 | 0.8248 | 0.7269 | 0.8163 | 0.8248 | 0.7515 | |
|
|
|
|
|
|
|
|
### Framework versions |
|
|
|
|
|
- Transformers 4.27.4 |
|
|
- Pytorch 2.0.0 |
|
|
- Datasets 2.11.0 |
|
|
- Tokenizers 0.13.3 |