Text Classification
Transformers
PyTorch
Dutch
bert
text classification
sentiment analysis
domain adaptation
text-embeddings-inference
Instructions to use clips/republic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use clips/republic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="clips/republic")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("clips/republic") model = AutoModelForSequenceClassification.from_pretrained("clips/republic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
b6dcad0
1
Parent(s): 23463e5
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,9 +17,9 @@ prediction = output[0]['label'] # 0=”neutral”; 1=”positive”; 2=”negat
|
|
| 17 |
```
|
| 18 |
|
| 19 |
### Training and data procedure
|
| 20 |
-
RePublic was domain-adapted on 91
|
| 21 |
|
| 22 |
-
The model was then fine-tuned on a sentiment classification task (“positive”, “negative”, “neutral”). The supervised data consisted of 4
|
| 23 |
|
| 24 |
### Evaluation
|
| 25 |
The model was evaluated by performing 10-fold cross validation on the annotated data described above. During cross validation, the optimal number of epochs (4), batch size (8), and learning rate (5e-5) were determined. The standard deviation of the macro-averaged F1-scores of the cross validation experiments amounts to 1.5%. The detailed results of predictions in the cross validation experiments can be found below:
|
|
|
|
| 17 |
```
|
| 18 |
|
| 19 |
### Training and data procedure
|
| 20 |
+
RePublic was domain-adapted on 91 661 Flemish news articles from three popular Flemish news providers (“Het Laatste Nieuws”, “Het Nieuwsblad” and “De Morgen”) that mention public agencies. This was done by performing BERT’s language modeling tasks (masked language modeling & next sentence prediction).
|
| 21 |
|
| 22 |
+
The model was then fine-tuned on a sentiment classification task (“positive”, “negative”, “neutral”). The supervised data consisted of 4 404 annotated sentences mentioning Flemish public agencies of which 1 257 sentences were positive, 1 485 sentences were negative and 1 662 sentences were neutral. Fine-tuning was performed for 4 epochs using a batch size of 8 and a learning rate of 5e-5.
|
| 23 |
|
| 24 |
### Evaluation
|
| 25 |
The model was evaluated by performing 10-fold cross validation on the annotated data described above. During cross validation, the optimal number of epochs (4), batch size (8), and learning rate (5e-5) were determined. The standard deviation of the macro-averaged F1-scores of the cross validation experiments amounts to 1.5%. The detailed results of predictions in the cross validation experiments can be found below:
|