Climate-TwitterBERT's picture
Update README.md
84001f5
|
raw
history blame
2.17 kB
metadata
language:
  - en
tags:
  - Twitter
  - Climate Change
license: mit

Model Card Climate-TwitterBERT-step-2

Overview:

Using Climate-TwitterBERT-step-1 (https://huggingface.co/Climate-TwitterBERT/Climate-TwitterBERT-step1) as the starting model, we fine-tuned on the downstream task to classify whether a given climate tweet belongs to hard/soft/promotion climate tweet.

The model provides a label and probability score, indicating whether a given tweet belongs to hard (label = 0), soft (label = 1), or promotion (label = 2).

Performance metrics:

Based on the test set, the model achieves the following results:

• Loss: 0.2613 • F1-weighted: 0.8008
• F1: 0.7798 • Accuracy: 0.8050 • Precision: 0.8034 • Recall: 0. 0.8050

Example usage:

from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification

task_name = 'text-classification'
model_name = 'Climate-TwitterBERT/ Climate-TwitterBERT-step2'

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

pipe = pipeline(task=task_name, model=model, tokenizer=tokenizer)

tweet = "We are committed to significantly cutting our carbon emissions by 30% before 2030."
result = pipe(tweet)
# The 'result' variable will contain the classification output: 0 = hard climate tweet, 1= soft climate tweet, and 2 = promotion tweet.

Citation:

@article{fzz2023climatetwitter,
  title={Responding to Climate Change crisis - firms' tradeoffs},
  author={Fritsch, Felix and Zhang, Qi and Zheng, Xiang},
  journal={Working paper},
  year={2023},
  institution={University of Mannheim, the Chinese University of Hong Kong, and NHH Norwegian School of Economics},
url={https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4527255}
}

Fritsch, F., Zhang, Q., & Zheng, X. (2023). Responding to Climate Change crisis - firms' tradeoffs [Working paper]. University of Mannheim, the Chinese University of Hong Kong, and NHH Norwegian School of Economics.

Framework versions

• Transformers 4.28.1 • Pytorch 2.0.1+cu118 • Datasets 2.14.1 • Tokenizers 0.13.3