🚀 finbert-tone-finetuned-finance-topic-classification
This model is a fine - tuned version of [yiyanghkust/finbert - tone](https://huggingface.co/yiyanghkust/finbert - tone) on the [Twitter Financial News Topic](https://huggingface.co/datasets/zeroshot/twitter - financial - news - topic) dataset, which can classify financial topics of tweets.
🚀 Quick Start
This model is a fine - tuned version of [yiyanghkust/finbert - tone](https://huggingface.co/yiyanghkust/finbert - tone) on [Twitter Financial News Topic](https://huggingface.co/datasets/zeroshot/twitter - financial - news - topic) dataset.
It achieves the following results on the evaluation set:
- Loss: 0.509021
- Accuracy: 0.910615
- F1: 0.910647
- Precision: 0.911335
- Recall: 0.910615
✨ Features
- The model determines the financial topic of given tweets over 20 various topics.
- Given the unbalanced distribution of the class labels, the weights were adjusted to pay attention to the less sampled labels which should increase overall performance.
🔧 Technical Details
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: 20
- mixed_precision_training: Native AMP
Training results
Training Loss |
Epoch |
Step |
Validation Loss |
Accuracy |
F1 |
Precision |
Recall |
No log |
1.0 |
266 |
0.5152 |
0.8552 |
0.8504 |
0.8508 |
0.8552 |
0.7618 |
2.0 |
532 |
0.3999 |
0.8790 |
0.8781 |
0.8842 |
0.8790 |
0.7618 |
3.0 |
798 |
0.3628 |
0.8943 |
0.8940 |
0.8958 |
0.8943 |
0.16 |
4.0 |
1064 |
0.3776 |
0.8997 |
0.9001 |
0.9025 |
0.8997 |
0.16 |
5.0 |
1330 |
0.4286 |
0.8999 |
0.9002 |
0.9022 |
0.8999 |
0.058 |
6.0 |
1596 |
0.4500 |
0.9043 |
0.9042 |
0.9055 |
0.9043 |
0.058 |
7.0 |
1862 |
0.4689 |
0.9021 |
0.9017 |
0.9026 |
0.9021 |
0.0267 |
8.0 |
2128 |
0.4918 |
0.9031 |
0.9029 |
0.9039 |
0.9031 |
0.0267 |
9.0 |
2394 |
0.5030 |
0.9048 |
0.9049 |
0.9060 |
0.9048 |
0.0177 |
10.0 |
2660 |
0.5052 |
0.9033 |
0.9034 |
0.9044 |
0.9033 |
0.0177 |
11.0 |
2926 |
0.5265 |
0.9036 |
0.9034 |
0.9055 |
0.9036 |
0.013 |
12.0 |
3192 |
0.5267 |
0.9041 |
0.9041 |
0.9058 |
0.9041 |
0.013 |
13.0 |
3458 |
0.5090 |
0.9106 |
0.9106 |
0.9113 |
0.9106 |
0.0105 |
14.0 |
3724 |
0.5315 |
0.9067 |
0.9067 |
0.9080 |
0.9067 |
0.0105 |
15.0 |
3990 |
0.5339 |
0.9084 |
0.9084 |
0.9093 |
0.9084 |
0.0068 |
16.0 |
4256 |
0.5414 |
0.9072 |
0.9074 |
0.9088 |
0.9072 |
0.0051 |
17.0 |
4522 |
0.5460 |
0.9092 |
0.9091 |
0.9102 |
0.9092 |
0.0051 |
18.0 |
4788 |
0.5438 |
0.9072 |
0.9073 |
0.9081 |
0.9072 |
0.0035 |
19.0 |
5054 |
0.5474 |
0.9072 |
0.9073 |
0.9080 |
0.9072 |
0.0035 |
20.0 |
5320 |
0.5484 |
0.9079 |
0.9080 |
0.9087 |
0.9079 |
Framework versions
- Transformers 4.25.1
- Pytorch 1.13.0+cu116
- Datasets 2.8.0
- Tokenizers 0.13.2
📚 Documentation
Tags
Property |
Details |
Tags |
generated_from_trainer, twitter - financial - topic - classification, financial, stocks, twitter |
Datasets
Property |
Details |
Datasets |
zeroshot/twitter - financial - news - topic |
Metrics
Property |
Details |
Metrics |
F1, accuracy, precision, recall |
Model Index
Property |
Details |
Model Name |
finbert - tone - finetuned - finance - topic - classification |
Task |
Text Classification (text - classification) |
Dataset Name |
twitter - financial - news - topic |
Dataset Type |
finance |
F1 |
0.910647 |
Accuracy |
0.910615 |
Widget Examples
Example Title |
Text |
Analyst Update |
Here are Thursday's biggest analyst calls: Apple, Amazon, Tesla, Palantir, DocuSign, Exxon & more |
Fed | Central Banks |
LIVE: ECB surprises with 50bps hike, ending its negative rate era. President Christine Lagarde is taking questions |
Company | Product News |
Goldman Sachs traders countered the industry’s underwriting slump with revenue gains that raced past analysts’ estimates. The trading operation posted a 32% surge in second - quarter revenue that included another banner period for fixed income |
Treasuries | Corporate Debt |
China Evergrande Group’s onshore bond holders rejected a plan by the distressed developer to further extend a bond payment which was due on Friday. Rebecca Choong Wilkins reports on Bloomberg Television |
Dividend |
Investing Club: Morgan Stanley's dividend, buyback pay us for our patience after quarterly missteps |
Earnings |
Investing Club: Our takes on Amazon and Apple heading into next week's earnings reports |
Energy | Oil |
JUST RELEASED: Oil Price Dynamics Report → Over the past week, oil prices decreased as supply expectations rose and anticipated demand remained unchanged. |
Financials |
Delta Air Lines fell short of profit expectations in the second quarter and said high operating costs will persist through the rest of the year. Bloomberg Opinion's Brooke Sutherland has more on 'Bloomberg Markets' |
Currencies |
BREAKING: The Indian rupee plummets to a record 80 per US dollar as foreign investors pull out money from the nation's stocks |
General News | Opinion |
Twitter and Elon Musk are now in a high stakes/high risk situation, one analyst said. |
Gold | Metals | Materials |
Copper prices are signaling that investors are bearish on the economy, strategist says |
IPO |
Johnson & Johnson CFO Joe Wolk says the company is positioned for the long term and the plans for its consumer operations include an IPO. He speaks on 'Bloomberg Markets' |
Legal | Regulation |
Company and Elon Musk are set for a blockbuster courtroom battle over Musk’s attempt to terminate his $44 billion acquisition deal for $TWTR, according to Wedbush analyst Dan Ives. |
M&A | Investments |
Amazon to buy primary health care provider One Medical for roughly $3.9 billion |
Macro |
Barclays Senior Analyst For Equity Research Jason Goldberg: 'Price expectations have changed.'' The global markets business recorded $6.47 billion of revenue in the quarter with rates, commodities and currencies helping drive the fixed - income gains. |
Markets |
US stocks push higher in a volatile session. We break it down on The Countdown to The Close |
Politics |
Zelenskyy fires security chiefs over ‘treasonous’ officials |
Personnel Change |
Airbnb co - founder Joe Gebbia is stepping down |
Stock Commentary |
French power group EDF requests its shares be suspended |
Stock Movement |
JUST IN: Alibaba shares slide as much as 5.7%, bringing this week's slump to over 15%, after it reportedly faced a data - theft inquiry |