Update README.md
Browse files
README.md
CHANGED
|
@@ -4,13 +4,13 @@ license: mit
|
|
| 4 |
|
| 5 |
# Model Card for BERT hate offensive tweets
|
| 6 |
|
| 7 |
-
BERT base uncased trained on the data that can be found here: MartynaKopyta/hate_offensive_tweets
|
| 8 |
|
| 9 |
-
You can find the notebook used for training in my GitHub repo: MartynaKopyta/BERT_FINE-TUNING
|
| 10 |
|
| 11 |
## Model Details
|
| 12 |
|
| 13 |
-
- **Finetuned from model bert-base-uncased
|
| 14 |
|
| 15 |
|
| 16 |
## Bias, Risks, and Limitations
|
|
@@ -19,12 +19,12 @@ The dataset was not big enough for BERT to learn to classify 3 classes accuratel
|
|
| 19 |
|
| 20 |
|
| 21 |
## How to Get Started with the Model
|
| 22 |
-
|
| 23 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 24 |
|
| 25 |
model = AutoModelForSequenceClassification.from_pretrained('MartynaKopyta/BERT_hate_offensive_tweets')
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained('MartynaKopyta/BERT_hate_offensive_tweets')
|
| 27 |
-
|
| 28 |
|
| 29 |
#### Training Hyperparameters
|
| 30 |
|
|
@@ -33,9 +33,11 @@ tokenizer = AutoTokenizer.from_pretrained('MartynaKopyta/BERT_hate_offensive_twe
|
|
| 33 |
- **epochs:3**
|
| 34 |
|
| 35 |
## Evaluation
|
| 36 |
-
|
| 37 |
Accuracy: 0.779373368146214
|
|
|
|
| 38 |
Classification Report:
|
|
|
|
| 39 |
precision recall f1-score support
|
| 40 |
|
| 41 |
0 0.74 0.68 0.71 1532
|
|
@@ -51,4 +53,5 @@ Confusion Matrix:
|
|
| 51 |
[ 169 1343 20]
|
| 52 |
[ 204 132 1196]]
|
| 53 |
|
| 54 |
-
MCC: 0.670
|
|
|
|
|
|
| 4 |
|
| 5 |
# Model Card for BERT hate offensive tweets
|
| 6 |
|
| 7 |
+
BERT base uncased trained on the data that can be found here: [MartynaKopyta/hate_offensive_tweets](https://huggingface.co/datasets/MartynaKopyta/hate_offensive_tweets) to classify tweets as 0 - hate, 1 - offensive or 2 - neither.
|
| 8 |
|
| 9 |
+
You can find the notebook used for training in my GitHub repo: [MartynaKopyta/BERT_FINE-TUNING](https://github.com/MartynaKopyta/BERT_FINE-TUNING/blob/main/BERT_hate_offensive_speech.ipynb).
|
| 10 |
|
| 11 |
## Model Details
|
| 12 |
|
| 13 |
+
- **Finetuned from model [bert-base-uncased](https://huggingface.co/bert-base-uncased)**
|
| 14 |
|
| 15 |
|
| 16 |
## Bias, Risks, and Limitations
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
## How to Get Started with the Model
|
| 22 |
+
```
|
| 23 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 24 |
|
| 25 |
model = AutoModelForSequenceClassification.from_pretrained('MartynaKopyta/BERT_hate_offensive_tweets')
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained('MartynaKopyta/BERT_hate_offensive_tweets')
|
| 27 |
+
```
|
| 28 |
|
| 29 |
#### Training Hyperparameters
|
| 30 |
|
|
|
|
| 33 |
- **epochs:3**
|
| 34 |
|
| 35 |
## Evaluation
|
| 36 |
+
```
|
| 37 |
Accuracy: 0.779373368146214
|
| 38 |
+
|
| 39 |
Classification Report:
|
| 40 |
+
|
| 41 |
precision recall f1-score support
|
| 42 |
|
| 43 |
0 0.74 0.68 0.71 1532
|
|
|
|
| 53 |
[ 169 1343 20]
|
| 54 |
[ 204 132 1196]]
|
| 55 |
|
| 56 |
+
MCC: 0.670
|
| 57 |
+
```
|