Climate-TwitterBERT commited on
Commit
3be53cf
·
1 Parent(s): ac06c00

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -54
README.md CHANGED
@@ -1,71 +1,73 @@
1
- ---
2
- license: mit
3
- tags:
4
- - generated_from_trainer
5
- metrics:
6
- - accuracy
7
- - precision
8
- - recall
9
- - f1
10
- model-index:
11
- - name: Climate-TwitterBERT-step1
12
- results: []
13
- ---
14
 
15
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
- should probably proofread and complete it, then remove this comment. -->
17
 
18
- # Climate-TwitterBERT-step1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- This model is a fine-tuned version of [Climate-TwitterBERT/ctbert_corporate_mlm](https://huggingface.co/Climate-TwitterBERT/ctbert_corporate_mlm) on an unknown dataset.
21
- It achieves the following results on the evaluation set:
22
- - Loss: 0.0693
23
- - Accuracy: 0.9767
24
- - Precision: 0.8882
25
- - Recall: 0.9346
26
- - F1-weighted: 0.9769
27
- - F1: 0.9108
28
 
29
- ## Model description
30
 
31
- More information needed
32
 
33
- ## Intended uses & limitations
34
 
35
- More information needed
36
 
37
- ## Training and evaluation data
38
 
39
- More information needed
40
 
41
- ## Training procedure
42
 
43
- ### Training hyperparameters
44
 
45
- The following hyperparameters were used during training:
46
- - learning_rate: 1e-05
47
- - train_batch_size: 128
48
- - eval_batch_size: 2
49
- - seed: 42
50
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
51
- - lr_scheduler_type: linear
52
- - lr_scheduler_warmup_ratio: 0.05
53
- - num_epochs: 4
54
 
55
- ### Training results
56
 
57
- | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1-weighted | F1 |
58
- |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:-----------:|:------:|
59
- | 0.2835 | 0.76 | 50 | 0.0636 | 0.9767 | 0.9252 | 0.8889 | 0.9765 | 0.9067 |
60
- | 0.0821 | 1.52 | 100 | 0.0632 | 0.9775 | 0.8841 | 0.9477 | 0.9778 | 0.9148 |
61
- | 0.0763 | 2.27 | 150 | 0.0627 | 0.9767 | 0.8882 | 0.9346 | 0.9769 | 0.9108 |
62
- | 0.0561 | 3.03 | 200 | 0.0670 | 0.9742 | 0.8720 | 0.9346 | 0.9745 | 0.9022 |
63
- | 0.0429 | 3.79 | 250 | 0.0693 | 0.9767 | 0.8882 | 0.9346 | 0.9769 | 0.9108 |
64
 
65
 
66
- ### Framework versions
67
 
68
- - Transformers 4.28.1
69
- - Pytorch 2.0.1+cu118
70
- - Datasets 2.14.1
71
- - Tokenizers 0.13.3
 
1
+ # Model Card Climate-TwitterBERT-step-1
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ ## Overview:
 
4
 
5
+ Using Covid-Twitter-BERT-v2 (https://huggingface.co/digitalepidemiologylab/covid-twitter-bert-v2) as the starting model, we continued domain-adaptive pre-training on a corpus of firm tweets between 2007 and 2020. The model was then fine-tuned on the downstream task to classify whether a given tweet is related to climate change topics.
6
+
7
+ The model provides a label and probability score, indicating whether a given tweet is related to climate change topics (label = 1) or not (label = 0).
8
+
9
+ ## Performance metrics:
10
+
11
+ Based on the test set, the model achieves the following results:
12
+
13
+ • Loss: 0.0632
14
+ • F1-weighted: 0.9778
15
+ • F1: 0.9148
16
+ • Accuracy: 0.9775
17
+ • Precision: 0. 8841
18
+ • Recall: 0. 9477
19
+
20
+ ## Example usage:
21
+
22
+ ```python
23
+ from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
24
+
25
+ task_name = 'binary'
26
+ model_name = Climate-TwitterBERT/ Climate-TwitterBERT-step1'
27
+
28
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
29
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
30
+
31
+ pipe = pipeline(task=‘binary‘, model=model, tokenizer=tokenizer)
32
+
33
+ tweet = "We are committed to significantly cutting our carbon emissions by 30% before 2030."
34
+ result = pipe(tweet)
35
+ # The 'result' variable will contain the classification output: 0 = non-climate tweet, 1= climate tweet
36
+ ```
37
+
38
+ ## Citation:
39
+
40
+ ```bibtex
41
+ @article{fzz2023climatetwitter,
42
+ title={Responding to Climate Change crisis - firms' tradeoffs},
43
+ author={Fritsch, Felix and Zhang, Qi and Zheng, Xiang},
44
+ journal={Working paper},
45
+ year={2023},
46
+ institution={University of Mannheim, the Chinese University of Hong Kong, and NHH Norwegian School of Economics},
47
+ url={https://ssrn.com/XXXXXXX}
48
+ }
49
+ ```
50
+
51
+ 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.
52
+
53
+
54
+ ## Framework versions
55
+ • Transformers 4.28.1
56
+ • Pytorch 2.0.1+cu118
57
+ • Datasets 2.14.1
58
+ • Tokenizers 0.13.3
59
 
 
 
 
 
 
 
 
 
60
 
 
61
 
 
62
 
 
63
 
 
64
 
 
65
 
 
66
 
 
67
 
 
68
 
 
 
 
 
 
 
 
 
 
69
 
 
70
 
 
 
 
 
 
 
 
71
 
72
 
 
73