Update README.md
Browse files
README.md
CHANGED
|
@@ -18,9 +18,9 @@ model-index:
|
|
| 18 |
type: text
|
| 19 |
metrics:
|
| 20 |
- type: accuracy
|
| 21 |
-
value: 0.
|
| 22 |
- type: multiclass_roc_auc
|
| 23 |
-
value: 0.
|
| 24 |
base_model:
|
| 25 |
- FacebookAI/roberta-large
|
| 26 |
---
|
|
@@ -30,7 +30,7 @@ base_model:
|
|
| 30 |
This repository contains a fine-tuned version of FinBERT (RoBERTa-based) for financial sentiment classification. The model predicts whether a financial news headline or sentence is **positive**, **neutral**, or **negative**.
|
| 31 |
|
| 32 |
## Model Overview
|
| 33 |
-
- **Base model:**
|
| 34 |
- **Task:** Financial sentiment classification (3 classes)
|
| 35 |
- **Training data:** Financial news headlines and sentences
|
| 36 |
- **Dataset source:** [Kaggle - Finance News Sentiments](https://www.kaggle.com/datasets/antobenedetti/finance-news-sentiments/data?select=dataset.csv)
|
|
@@ -40,12 +40,12 @@ This repository contains a fine-tuned version of FinBERT (RoBERTa-based) for fin
|
|
| 40 |
- 2: Positive
|
| 41 |
|
| 42 |
## Evaluation Results
|
| 43 |
-
- **Test Accuracy:** 0.
|
| 44 |
-
- **Multiclass ROC AUC (macro-average):** 0.
|
| 45 |
|
| 46 |
## Model Folder Structure
|
| 47 |
```
|
| 48 |
-
|
| 49 |
config.json
|
| 50 |
merges.txt
|
| 51 |
model.safetensors
|
|
@@ -54,7 +54,7 @@ finbert_finetuned/
|
|
| 54 |
tokenizer.json
|
| 55 |
vocab.json
|
| 56 |
```
|
| 57 |
-
**Note:** Only the model files are stored in `
|
| 58 |
|
| 59 |
## How to Use the Fine-Tuned Model
|
| 60 |
|
|
@@ -63,7 +63,7 @@ finbert_finetuned/
|
|
| 63 |
import torch
|
| 64 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 65 |
# Directory of the model folder
|
| 66 |
-
model_dir = "
|
| 67 |
# read the model
|
| 68 |
tokenizer = AutoTokenizer.from_pretrained(model_dir)
|
| 69 |
model = AutoModelForSequenceClassification.from_pretrained(model_dir)
|
|
@@ -82,13 +82,10 @@ print(f"Predicted sentiment: {label_map[pred]}")
|
|
| 82 |
|
| 83 |
## Notes
|
| 84 |
- The model was trained and evaluated on data from the Kaggle dataset linked above.
|
| 85 |
-
- The `
|
| 86 |
- Scripts and datasets are not included in the model folder or in the model upload.
|
| 87 |
- For best results, use a GPU for inference if available.
|
| 88 |
|
| 89 |
-
## Citation
|
| 90 |
-
If you use this model, please cite the original [FinBERT paper](https://arxiv.org/abs/2006.08097) and the [Kaggle dataset](https://www.kaggle.com/datasets/antobenedetti/finance-news-sentiments/data?select=dataset.csv).
|
| 91 |
-
|
| 92 |
---
|
| 93 |
|
| 94 |
**Date:** June 2025
|
|
|
|
| 18 |
type: text
|
| 19 |
metrics:
|
| 20 |
- type: accuracy
|
| 21 |
+
value: 0.7627
|
| 22 |
- type: multiclass_roc_auc
|
| 23 |
+
value: 0.9124
|
| 24 |
base_model:
|
| 25 |
- FacebookAI/roberta-large
|
| 26 |
---
|
|
|
|
| 30 |
This repository contains a fine-tuned version of FinBERT (RoBERTa-based) for financial sentiment classification. The model predicts whether a financial news headline or sentence is **positive**, **neutral**, or **negative**.
|
| 31 |
|
| 32 |
## Model Overview
|
| 33 |
+
- **Base model:** RoBERTa-Large
|
| 34 |
- **Task:** Financial sentiment classification (3 classes)
|
| 35 |
- **Training data:** Financial news headlines and sentences
|
| 36 |
- **Dataset source:** [Kaggle - Finance News Sentiments](https://www.kaggle.com/datasets/antobenedetti/finance-news-sentiments/data?select=dataset.csv)
|
|
|
|
| 40 |
- 2: Positive
|
| 41 |
|
| 42 |
## Evaluation Results
|
| 43 |
+
- **Test Accuracy:** 0.7627
|
| 44 |
+
- **Multiclass ROC AUC (macro-average):** 0.9124
|
| 45 |
|
| 46 |
## Model Folder Structure
|
| 47 |
```
|
| 48 |
+
roberta_finance_sentiment/
|
| 49 |
config.json
|
| 50 |
merges.txt
|
| 51 |
model.safetensors
|
|
|
|
| 54 |
tokenizer.json
|
| 55 |
vocab.json
|
| 56 |
```
|
| 57 |
+
**Note:** Only the model files are stored in `roberta_finance_sentiment/`. Scripts and datasets are kept separate and are not included in this folder or in the model upload.
|
| 58 |
|
| 59 |
## How to Use the Fine-Tuned Model
|
| 60 |
|
|
|
|
| 63 |
import torch
|
| 64 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 65 |
# Directory of the model folder
|
| 66 |
+
model_dir = "roberta_finance_sentiment"
|
| 67 |
# read the model
|
| 68 |
tokenizer = AutoTokenizer.from_pretrained(model_dir)
|
| 69 |
model = AutoModelForSequenceClassification.from_pretrained(model_dir)
|
|
|
|
| 82 |
|
| 83 |
## Notes
|
| 84 |
- The model was trained and evaluated on data from the Kaggle dataset linked above.
|
| 85 |
+
- The `roberta_finance_sentiment/` folder contains only the files needed for inference.
|
| 86 |
- Scripts and datasets are not included in the model folder or in the model upload.
|
| 87 |
- For best results, use a GPU for inference if available.
|
| 88 |
|
|
|
|
|
|
|
|
|
|
| 89 |
---
|
| 90 |
|
| 91 |
**Date:** June 2025
|