Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google-bert/bert-base-uncased
|
| 3 |
+
datasets:
|
| 4 |
+
- stanfordnlp/sentiment140
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# sentiment-bert-base
|
| 8 |
+
|
| 9 |
+
Fine-tuned BERT-base for binary sentiment classification on the Sentiment140 dataset (1.6M tweets).
|
| 10 |
+
|
| 11 |
+
## Base model
|
| 12 |
+
|
| 13 |
+
[google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) — the original BERT-base-uncased from Devlin et al. (2019), 110M parameters.
|
| 14 |
+
|
| 15 |
+
## Training
|
| 16 |
+
|
| 17 |
+
- Dataset: Sentiment140 (1.6M tweets, 80/20 split, seed 42)
|
| 18 |
+
- Hyperparameters: learning rate 2e-5, batch size 16, 3 epochs
|
| 19 |
+
- Hardware: NVIDIA A10G, AWS SageMaker (g5.2xlarge)
|
| 20 |
+
- Training time: 7.3 hours
|
| 21 |
+
- Trainer: Hugging Face Transformers + Trainer API; load_best_model_at_end=True
|
| 22 |
+
|
| 23 |
+
## Test set performance
|
| 24 |
+
|
| 25 |
+
| Metric | Value |
|
| 26 |
+
|---|---|
|
| 27 |
+
| Accuracy | 87.46% |
|
| 28 |
+
| Precision | 0.880 |
|
| 29 |
+
| Recall | 0.869 |
|
| 30 |
+
| F1 | 0.874 |
|
| 31 |
+
|
| 32 |
+
## Intended use
|
| 33 |
+
|
| 34 |
+
Demonstration model for an academic purposes
|
| 35 |
+
|
| 36 |
+
## Limitations
|
| 37 |
+
|
| 38 |
+
- English only, binary sentiment, 2009-era Twitter language.
|
| 39 |
+
- Sentiment140 labels generated automatically using emoticons (distant supervision), introducing systematic noise.
|
| 40 |
+
- Does not handle sarcasm reliably (the dataset does not separate it as a phenomenon).
|