File size: 3,172 Bytes
b78a597
 
 
 
 
 
d44688d
 
 
b78a597
 
 
d44688d
 
065b589
b78a597
 
 
 
d55f9a6
 
b78a597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d44688d
 
 
b78a597
 
 
d44688d
b78a597
 
 
d44688d
 
 
b78a597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d55f9a6
b78a597
 
 
 
 
 
 
 
 
 
 
 
 
d44688d
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
license: apache-2.0
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
- recall
- precision
model-index:
- name: fnet-base-Financial_Sentiment_Analysis
  results: []
language:
- en
pipeline_tag: text-classification
---

# fnet-base-Financial_Sentiment_Analysis

This model is a fine-tuned version of [google/fnet-base](https://huggingface.co/google/fnet-base).

It achieves the following results on the evaluation set:
- Loss: 0.3281
- Accuracy: 0.8117
- Weighted f1: 0.8110
- Micro f1: 0.8117
- Macro f1: 0.7472
- Weighted recall: 0.8117
- Micro recall: 0.8117
- Macro recall: 0.7394
- Weighted precision: 0.8144
- Micro precision: 0.8117
- Macro precision: 0.7588

## Model description

This is a sentiment analysis (text classification) model of statements 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_v2.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: 5

### 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.6116        | 1.0   | 134  | 0.5127          | 0.6304   | 0.5606      | 0.6304   | 0.4705   | 0.6304          | 0.6304       | 0.5272       | 0.6722             | 0.6304          | 0.6103          |
| 0.4497        | 2.0   | 268  | 0.3885          | 0.7578   | 0.7490      | 0.7578   | 0.6783   | 0.7578          | 0.7578       | 0.6636       | 0.7677             | 0.7578          | 0.7196          |
| 0.3319        | 3.0   | 402  | 0.3546          | 0.7799   | 0.7784      | 0.7799   | 0.7185   | 0.7799          | 0.7799       | 0.7167       | 0.7979             | 0.7799          | 0.7440          |
| 0.2953        | 4.0   | 536  | 0.3312          | 0.8117   | 0.8105      | 0.8117   | 0.7435   | 0.8117          | 0.8117       | 0.7356       | 0.8111             | 0.8117          | 0.7532          |
| 0.2446        | 5.0   | 670  | 0.3281          | 0.8117   | 0.8110      | 0.8117   | 0.7472   | 0.8117          | 0.8117       | 0.7394       | 0.8144             | 0.8117          | 0.7588          |


### Framework versions

- Transformers 4.27.4
- Pytorch 2.0.0
- Datasets 2.11.0
- Tokenizers 0.13.3