Downloads · 30 days
12
4% of all-time downloads
Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset
Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset is a text classification model from Rendika. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Berikut adalah README.txt yang menarik dan informatif untuk model yang telah Anda unggah ke Kaggle Model Hub:
Downloads · 30 days
12
4% of all-time downloads
All-time downloads
291
Public
Parameters
68.1M
272 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors272 MB · 100%
From the Hugging Face model README
Berikut adalah README.txt yang menarik dan informatif untuk model yang telah Anda unggah ke Kaggle Model Hub:
This repository contains a fine-tuned version of the DistilBERT model (based on cahya/distilbert-base-indonesian) for Indonesian text classification. The model is trained to classify text into eight distinct categories, including politics, socio-cultural, defense and security, ideology, economy, natural resources, demography, and geography.
The dataset used for training the model underwent significant augmentation and balancing to address class imbalance issues. Below are the details of the dataset before and after augmentation:
| Category | Count |
|---|---|
| Politik | 2972 |
| Sosial Budaya | 587 |
| Pertahanan dan Keamanan | 400 |
| Ideologi | 400 |
| Ekonomi | 367 |
| Sumber Daya Alam | 192 |
| Demografi | 62 |
| Geografi | 20 |
| Category | Count |
|---|---|
| Politik | 2969 |
| Demografi | 427 |
| Sosial Budaya | 422 |
| Ideologi | 343 |
| Pertahanan dan Keamanan | 331 |
| Ekonomi | 309 |
| Sumber Daya Alam | 156 |
| Geografi | 133 |
| Encoded | Label |
|---|---|
| 0 | Demografi |
| 1 | Ekonomi |
| 2 | Geografi |
| 3 | Ideologi |
| 4 | Pertahanan dan Keamanan |
| 5 | Politik |
| 6 | Sosial Budaya |
| 7 | Sumber Daya Alam |
The dataset was split into training and testing sets with an 85:15 ratio.
The model was trained for 4 epochs, achieving the following results:
| Epoch | Train Loss | Train Accuracy |
|---|---|---|
| 1 | 1.0240 | 0.6766 |
| 2 | 0.5615 | 0.8220 |
| 3 | 0.3270 | 0.9014 |
| 4 | 0.1759 | 0.9481 |
The model was evaluated using precision, recall, and F1 scores, with the following results:
| Category | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| Demografi | 0.94 | 0.91 | 0.92 | 64 |
| Ekonomi | 0.67 | 0.72 | 0.69 | 46 |
| Geografi | 0.95 | 0.95 | 0.95 | 20 |
| Ideologi | 0.71 | 0.56 | 0.62 | 52 |
| Pertahanan dan Keamanan | 0.69 | 0.66 | 0.67 | 50 |
| Politik | 0.84 | 0.85 | 0.84 | 446 |
| Sosial Budaya | 0.38 | 0.40 | 0.39 | 63 |
| Sumber Daya Alam | 0.50 | 0.57 | 0.53 | 23 |
To use this model, you can load it using the Hugging Face Transformers library:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
model = AutoModelForSequenceClassification.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
This fine-tuned DistilBERT model for Indonesian text classification demonstrates robust performance across various categories. The augmentation and balancing of the dataset have contributed significantly to the model's ability to generalize well on the test set.
Feel free to use this model for your Indonesian text classification tasks, and don't hesitate to reach out if you have any questions or feedback.