File size: 3,008 Bytes
394e351
 
 
 
 
 
 
 
 
 
 
6aa0bd3
 
394e351
 
 
 
 
 
a821f6c
 
 
 
 
394e351
 
 
6aa0bd3
 
 
 
 
 
 
 
 
 
 
 
394e351
 
 
6aa0bd3
 
 
394e351
 
 
6aa0bd3
394e351
d1ede2c
 
 
 
394e351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6aa0bd3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
- recall
- precision
model-index:
- name: ernie-2.0-base-en-Tweet_About_Disaster_Or_Not
  results: []
language:
- en
---

# ernie-2.0-base-en-Tweet_About_Disaster_Or_Not

This model is a fine-tuned version of [nghuyong/ernie-2.0-base-en](https://huggingface.co/nghuyong/ernie-2.0-base-en) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2292
- Accuracy: 0.9156
- F1: 0.7876
- Recall: 0.8436
- Precision: 0.7386

## Model description

This is a binary classification model to determine if tweet input samples are about a disaster or not.

For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Binary%20Classification/Transformer%20Comparison/Is%20This%20Tweet%20Referring%20to%20a%20Disaster%20or%20Not%3F%20-%20ERNIE.ipynb

### Associated Projects
This project is part of a comparison of multiple transformers. The others can be found at the following links:

- https://huggingface.co/DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not
- https://huggingface.co/DunnBC22/deberta-v3-small-Tweet_About_Disaster_Or_Not
- https://huggingface.co/DunnBC22/albert-base-v2-Tweet_About_Disaster_Or_Not
- https://huggingface.co/DunnBC22/electra-base-emotion-Tweet_About_Disaster_Or_Not
- https://huggingface.co/DunnBC22/distilbert-base-uncased-Tweet_About_Disaster_Or_Not

## Intended uses & limitations

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

The main limitation is the quality of the data source.

## Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/vstepanenko/disaster-tweets

_Input Word Length By Class:_

![Length of Input Text (in Words) By Class](https://github.com/DunnBC22/NLP_Projects/raw/main/Binary%20Classification/Transformer%20Comparison/Images/Tweet%20Word%20Lengths%20By%20Class.png)

## Training procedure

### 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: 5

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     | Recall | Precision |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:------:|:---------:|
| 0.347         | 1.0   | 143  | 0.2663          | 0.8777   | 0.7342 | 0.9100 | 0.6154    |
| 0.2192        | 2.0   | 286  | 0.2292          | 0.9156   | 0.7876 | 0.8436 | 0.7386    |
| 0.132         | 3.0   | 429  | 0.2629          | 0.9129   | 0.7843 | 0.8531 | 0.7258    |
| 0.0767        | 4.0   | 572  | 0.3266          | 0.9120   | 0.7807 | 0.8436 | 0.7265    |
| 0.0532        | 5.0   | 715  | 0.3622          | 0.9120   | 0.7788 | 0.8341 | 0.7303    |


### Framework versions

- Transformers 4.26.1
- Pytorch 1.13.1
- Datasets 2.9.0
- Tokenizers 0.12.1