Downloads · 30 days
3
6% of all-time downloads
YagiASAFAS/MyPoliBERT
MyPoliBERT is a machine learning model from YagiASAFAS. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
3
6% of all-time downloads
All-time downloads
51
Public
Repo size
3.5 GB
Likes
0
Public
Click a slice to open those files.
.bin438 MB · 100%
From the Hugging Face model README
MyPoliBERT is a fine-tuned version of bert-base-uncased designed to classify political texts in Malaysia. This model performs multi-label and multi-class classification for 12 political topics (Democracy, Economy, Race, Leadership, Development, Corruption, Instability, Safety, Administration, Education, Religion, Environment) with four sentiment classes (Unknown: 0, Negative: 1, Neutral: 2, Positive: 3). The training data comprises diverse sources, including Malaysian news articles, Reddit posts, and Instagram content.
Intended Uses:
This model is intended for analyzing political texts (such as news articles and social media posts) in a Malaysian context. It identifies which political topics are mentioned and predicts the sentiment (polarity) for each topic.
Limitations:
Data Sources:
These sources were combined into a single dataset containing approximately 24,260 records. 80% of the dataset was used for training, and 20% was reserved for validation.
Task:
The model performs multi-task learning, simultaneously predicting 12 topics and their respective sentiment classes.
Hyperparameters:
Training Configuration (TrainingArguments):
Custom Trainer:
The compute_loss method calculates the cross-entropy loss for each label and averages the losses across all labels.
It achieves the following results on the evaluation set:
These results indicate that the model demonstrates robust performance across most topics, with high accuracy and F1 scores. However, the performance for some topics, such as Leadership, is relatively lower, suggesting room for improvement through additional data or model refinement.
Hyperparameters:
Training Configuration (TrainingArguments):
Custom Trainer:
The compute_loss method calculates the cross-entropy loss for each label and averages the losses across all labels.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Democracy F1 | Democracy Accuracy | Economy F1 | Economy Accuracy | Race F1 | Race Accuracy | Leadership F1 | Leadership Accuracy | Development F1 | Development Accuracy | Corruption F1 | Corruption Accuracy | Instability F1 | Instability Accuracy | Safety F1 | Safety Accuracy | Administration F1 | Administration Accuracy | Education F1 | Education Accuracy | Religion F1 | Religion Accuracy | Environment F1 | Environment Accuracy | Overall F1 | Overall Accuracy |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.2991 | 1.0 | 1213 | 0.2534 | 0.9250 | 0.9411 | 0.9189 | 0.9239 | 0.9366 | 0.9396 | 0.7906 | 0.7939 | 0.8519 | 0.8673 | 0.9471 | 0.9503 | 0.9060 | 0.9151 | 0.9130 | 0.9147 | 0.8565 | 0.8788 | 0.9515 | 0.9538 | 0.9342 | 0.9386 | 0.9777 | 0.9777 | 0.9091 | 0.9162 |
| 0.2005 | 2.0 | 2426 | 0.2275 | 0.9433 | 0.9507 | 0.9231 | 0.9225 | 0.9409 | 0.9402 | 0.7996 | 0.8042 | 0.8763 | 0.8844 | 0.9472 | 0.9470 | 0.9102 | 0.9188 | 0.9190 | 0.9186 | 0.8776 | 0.8928 | 0.9603 | 0.9610 | 0.9417 | 0.9437 | 0.9799 | 0.9800 | 0.9183 | 0.9220 |
| 0.1317 | 3.0 | 3639 | 0.2324 | 0.9434 | 0.9507 | 0.9275 | 0.9295 | 0.9443 | 0.9450 | 0.8091 | 0.8116 | 0.8830 | 0.8899 | 0.9531 | 0.9549 | 0.9142 | 0.9202 | 0.9205 | 0.9200 | 0.8800 | 0.8953 | 0.9568 | 0.9573 | 0.9418 | 0.9417 | 0.9810 | 0.9808 | 0.9212 | 0.9248 |
| 0.0932 | 4.0 | 4852 | 0.2584 | 0.9436 | 0.9435 | 0.9250 | 0.9258 | 0.9444 | 0.9450 | 0.7886 | 0.7836 | 0.8810 | 0.8889 | 0.9498 | 0.9501 | 0.9149 | 0.9165 | 0.9196 | 0.9200 | 0.8802 | 0.8829 | 0.9559 | 0.9561 | 0.9377 | 0.9378 | 0.9810 | 0.9808 | 0.9185 | 0.9193 |
| 0.0609 | 5.0 | 6065 | 0.2606 | 0.9483 | 0.9493 | 0.9280 | 0.9283 | 0.9431 | 0.9439 | 0.8079 | 0.8046 | 0.8877 | 0.8912 | 0.9507 | 0.9518 | 0.9152 | 0.9190 | 0.9207 | 0.9209 | 0.8849 | 0.8881 | 0.9570 | 0.9584 | 0.9406 | 0.9400 | 0.9822 | 0.9821 | 0.9222 | 0.9231 |
| 0.0447 | 6.0 | 7278 | 0.2699 | 0.9500 | 0.9524 | 0.9310 | 0.9326 | 0.9485 | 0.9493 | 0.8048 | 0.8048 | 0.8912 | 0.8945 | 0.9510 | 0.9520 | 0.9168 | 0.9223 | 0.9242 | 0.9239 | 0.8906 | 0.8986 | 0.9575 | 0.9586 | 0.9411 | 0.9417 | 0.9820 | 0.9821 | 0.9241 | 0.9261 |
| 0.0333 | 7.0 | 8491 | 0.2745 | 0.9529 | 0.9547 | 0.9324 | 0.9334 | 0.9516 | 0.9522 | 0.8055 | 0.8030 | 0.8902 | 0.8934 | 0.9527 | 0.9545 | 0.9189 | 0.9235 | 0.9254 | 0.9260 | 0.8909 | 0.8949 | 0.9580 | 0.9586 | 0.9425 | 0.9427 | 0.9826 | 0.9827 | 0.9253 | 0.9266 |
| 0.0246 | 8.0 | 9704 | 0.2776 | 0.9521 | 0.9530 | 0.9330 | 0.9338 | 0.9499 | 0.9503 | 0.8086 | 0.8065 | 0.8926 | 0.8963 | 0.9513 | 0.9524 | 0.9211 | 0.9250 | 0.9263 | 0.9266 | 0.8900 | 0.8963 | 0.9584 | 0.9596 | 0.9408 | 0.9411 | 0.9828 | 0.9829 | 0.9256 | 0.9270 |