CoolFace
Modelpublic

DunnBC22/bert-base-uncased-News_About_Gold

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes11downloads
Model Card

bert-base-uncased-NewsAboutGold

This model is a fine-tuned version of bert-base-uncased. It achieves the following results on the evaluation set:

  • Loss: 0.2995
  • Accuracy: 0.9139
  • Weighted f1: 0.9133
  • Micro f1: 0.9139
  • Macro f1: 0.8758
  • Weighted recall: 0.9139
  • Micro recall: 0.9139
  • Macro recall: 0.8647
  • Weighted precision: 0.9131
  • Micro precision: 0.9139
  • Macro precision: 0.8885

Model description

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Sentiment%20Analysis/Sentiment%20Analysis%20of%20Commodity%20News%20-%20Gold%20(Transformer%20Comparison)/News%20About%20Gold%20-%20Sentiment%20Analysis%20-%20Bert-Base%20with%20W%26B.ipynb

This project is part of a comparison of seven (7) transformers. Here is the README page for the comparison: https://github.com/DunnBC22/NLP_Projects/tree/main/Sentiment%20Analysis/Sentiment%20Analysis%20of%20Commodity%20News%20-%20Gold%20(Transformer%20Comparison)

Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/ankurzing/sentiment-analysis-in-commodity-market-gold

Input Word Length:

Length of Input Text (in Words)/Images/Input%20Word%20Length.png)

Class Distribution:

Length of Input Text (in Words)/Images/Class%20Distribution.png)

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • trainbatchsize: 64
  • evalbatchsize: 64
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: linear
  • num_epochs: 5

Training results

Training LossEpochStepValidation LossAccuracyWeighted f1Micro f1Macro f1Weighted recallMicro recallMacro recallWeighted precisionMicro precisionMacro precision
0.68091.01330.33470.89740.89280.89740.80430.89740.89740.77100.89660.89740.8800
0.27782.02660.28440.91440.91450.91440.86680.91440.91440.86890.91500.91440.8650
0.20223.03990.28230.91720.91660.91720.88200.91720.91720.86910.91650.91720.8968
0.14964.05320.28560.91670.91640.91670.88380.91670.91670.86860.91670.91670.9027
0.11965.06650.29950.91390.91330.91390.87580.91390.91390.86470.91310.91390.8885

Framework versions

  • Transformers 4.28.1
  • Pytorch 2.0.0
  • Datasets 2.11.0
  • Tokenizers 0.13.3

License Notice

This model is a fine-tuned derivative of a pretrained model. Users must comply with the original model license.

Dataset Notice

This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions.