Multi-Label Classification for Opinion Mining in The Presidential Election using TF-IDF with NB And SVM

Authors

  • Ricy Ardiansyah University Ahmad Dahlan, Indonesia
  • Herman Yuliansyah Universitas Ahmad Dahlan, Indonesia
  • Anton Yudhana Universitas Ahmad Dahlan, Indonesia

DOI:

https://doi.org/10.31961/eltikom.v9i1.1432

Keywords:

Presidential Election, Political Sentiment, Multi-label Classification, Text Classification, Naive Bayes

Abstract

Public opinion plays a crucial role in presidential elections, shaping voter choices and influencing outcomes. Most sentiment analysis studies focus on binary (positive vs. negative) or multiclass (positive, negative, neutral) classification, which limits their ability to capture opinions that express multiple sentiments simultaneously. In presidential elections, a single opinion may support one candidate while criticizing another. This study proposes a MultiLabelBinarizer model to classify candidate and sentiment labels simultaneously—an approach that remains underexplored. The model combines Naïve Bayes (NB) and Support Vector Machine (SVM) for opinion mining using public data and TF-IDF for feature extraction, applying Multinomial and Linear kernels. Performance is evaluated using Accuracy, Precision, Recall, and F1-score. The study is conducted in two stages: developing a multi-label analysis model for presidential candidates and testing the effectiveness of cross-validation. Results show that multi-label classification is effective for both candidate and sentiment categories. Cross-validation with NB and SVM yields high accuracy. NB achieves 0.89 for candidate labels and 0.86 for sentiment labels. SVM performs better, with 0.93 for candidate labels and 0.94 for sentiment labels. While SVM provides higher accuracy, NB offers faster implementation with still competitive results.

Downloads

Download data is not yet available.

References

W. W. Norlaila, Winarno dan E. T. Luthfi, “Analisis Sentimen Masyarakat Tentang Tambang Di Indonesia Pada Twitter Menggunakan Data Mining,” J. Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 3, hal. 1091–1099, 2024.

Elinda, H. Yuliansyah, M. Iqbal, dan A. Latiffi, “Sentiment Analysis of the Sheikh Zayed Grand Mosque ’ s Visitor Reviews on Google Maps Using the VADER Method,” Int. J. Adv. Data Inf. Syst., vol. 5, no. 1, 2024, doi: 10.59395/ijadis.v5i1.1320.

H. Yuliansyah, S. A. Mulasari, dan F. A. Ghozali, “Sentiment Analysis of the Waste Problem based on YouTube comments using VADER and Deep Translator,” J. MEDIA Inform. BUDIDARMA, vol. 8, hal. 663–673, 2024, doi: 10.30865/mib.v8i1.6918.

T. Tukino dan F. Fifi, “Penerapan Support Vector Machine Untuk Analisis Sentimen Pada Layanan Ojek Online,” J. Desain Dan Anal. Teknol., vol. 3, no. 2, hal. 104–113, 2024, doi: 10.58520/jddat.v3i2.59.

J. Tao dan X. Fang, “Toward Multi ‑ Label Sentiment Analysis : A Transfer Learning Based Approach,” J. Big Data, hal. 1–26, 2020, doi: 10.1186/s40537-019-0278-0.

N. Wijaya dan E. S. Panjaitan, “Analisis Sentimen Ulasan Aplikasi Instagram di Google Play Store : Pendekatan Multinomial Naive Bayes dan Berbasis Leksikon,” Build. Informatics, Technol. Sci., vol. 6, no. 2, hal. 921–929, 2024, doi: 10.47065/bits.v6i2.5615.

A. A. Firdaus, A. Yudhana, dan I. Riadi, “Prediction of Presidential Election Results using Sentiment Analysis with Pre and Post Candi-date Registration Data,” J. Ilmu Komput. dan Inform., vol. 10, no. 1, hal. 36–46, 2024.

I. S. Dara Tursina, Sherly Rosa, Chastine Fatichah, “Metode Hibrida Oversampling Untuk Menangani Imbalanced Multi-Label,” J. Ilm. Teknol. Inf., vol. 22, no. 1, hal. 32–44, 2024.

H. I. Ramanda M, Reza Dwi Restiyan, “Analisis Sentimen Masyarakat terhadap Perilaku Lawan Arah yang diunggah pada Media Sosial Youtube Menggunakan Naïve Bayes,” J. Informatics Comput. Eng., vol. 02, no. 02, hal. 75–83, 2024.

A. Azzawagama, A. Yudhana, dan I. Riadi, “Indonesian presidential election sentiment : Dataset of response public before 2024,” Data Br., vol. 52, hal. 109993, 2024, doi: 10.1016/j.dib.2023.109993.

M. I. Nia Mardiah, Leni Marlina, Khairul, Zulham Sitorus, “Analysis Of Indonesian People ’ s Sentiment Towards 2024 Presidential Candidates On Social Media Using Naïve Bayes Classifier and Support Vector Machine,” Build. Informatics, Technol. Sci., vol. 6, no. 2, hal. 950–960, 2024, doi: 10.47065/bits.v6i2.5766.

H. Y. Hisyam Agus Setiawan, “Analisis Sentimen Berbasis Aspek Terhadap Ulasan Pengguna pada Game Honkai: Star Rail Menggunakan Naïve Bayes Classifier,” J. Sist. Inf., vol. 13, no. 5, hal. 1956–1971, 2024.

H. R. Alhakiem dan E. B. Setiawan, “Aspect-Based Sentiment Analysis on Twitter Using Logistic Regression with FastText Feature Expansion,” J. Rekayasa Sist. dan Teknol. Inf., vol. 5, no. 158, hal. 840–846, 2022, [Daring]. Tersedia pada: doi: https://doi.org/10.29207/resti.v6i5.4429

M. Theo, A. Bangsa, S. Priyanta, dan Y. Suyanto, “Aspect-Based Sentiment Analysis of Online Marketplace Reviews Using Convolu-tional Neural Network,” Indones. J. Comput. Cybern. Syst., vol. 14, no. 2, hal. 123–134, 2020, doi: 10.22146/ijccs.51646.

K. Tanoto, A. A. S. Gunawan, D. Suhartono, T. N. Mursitama, A. Rahayu, dan M. I. M. Ariff, “Investigation of Challenges in Aspect-Based Sentiment Analysis Enhanced Using Softmax Function on Twitter During the 2024 Indonesian Presidential Election,” Procedia Comput. Sci., vol. 245, no. 2022, hal. 989–997, 2024, doi: 10.1016/j.procs.2024.10.327.

J. Fehle, T. Schmidt, L. Münster, dan C. Wolff, “Aspect-Based Sentiment Analysis as a Multi-Label Classification Task on the Domain of German Hotel Reviews,” Assoc. Comput. Linguist., hal. 202–218, 2023.

O. Alqaryouti, N. Siyam, A. A. Monem, dan K. Shaalan, “Aspect-Based Sentiment Analysis Using Smart Government Review Data,” Appl. Comput. Informatics, vol. 20, no. 1/2, hal. 142–161, 2019, doi: 10.1016/j.aci.2019.11.003.

K. A. Pradani dan L. H. Suadaa, “Automated Essay Scoring Menggunakan Semantic Textual Berbasis Transformer Untuk Penilaian Ujian Esai,” J. Teknol. Inf. dan Ilmu Komput., vol. 10, no. 6, hal. 1177–1184, 2023, doi: 10.25126/jtiik.2023107338.

A. Syam, G. Hardy, A. Salim, D. Fatmarani, dan M. Fajar, “Analisis Teknik Preprocessing pada Sentimen Masyarakat Terkait Konflik Israel-Palestina Menggunakan Support Vector Machine,” J. Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 3, hal. 1464–1472, 2024.

R. Saputra dan M. G. Pradana, “Implementasi Algoritma Cosine Similarity dan TF- IDF dalam Menentukan Rumpun Jabatan,” J. Tek. Inform., vol. 12, no. 1, hal. 1–11, 2024, doi: 10.32832/kreatif.v12i1.15470.

E. Pratiwi, “Analisa Sentimen Penghapusan Tilang Manual Menjadi Tilang Elektronik Menggunakan Text Mining Dan TermFrequen-cy Inverse Document Frequency ( Tf-Idf ),” Konf. Nas. Teknol. Inf. dan Komput., vol. 7, no. 1, hal. 89–97, 2024, doi: 10.30865/komik.v6i1.8043.

Y. Pratama, A. Roberto Tampubolon, L. Diantri Sianturi, R. Diana Manalu, dan D. Frietz Pangaribuan, “Implementation of Sentiment Analysis on Twitter Using Naïve Bayes Algorithm to Know the People Responses to Debate of DKI Jakarta Governor Election,” J. Phys. Conf. Ser., vol. 1175, hal. 012102, Mar 2019, doi: 10.1088/1742-6596/1175/1/012102.

L. Š. and D. B.-Š. Damir Krstinić, Maja Braović, “Multi-Label Classifier Performance Evaluation With Confusion Matrix,” Comput. Sci. Inf. Technol., 2020, doi: 10.5121/csit.2020.100801.

A. W. Ishlah, S. Sudarno, dan P. Kartikasari, “Implementasi Gridsearchcv Pada Support Vector Regression (SVR) Untuk Peramalan Harga Saham,” J. Gaussian, vol. 12, no. 2, hal. 276–286, Jul 2023, doi: 10.14710/j.gauss.12.2.276-286.

D. Krstinić, M. Braović, L. Šerić, and D. Božić-Štulić, “Multi-label Classifier Performance Evaluation with Confusion Matrix,” in Com-puter Science & Information Technology, Jun. 2020, vol. 10, no. 08, pp. 01–14. doi: 10.5121/csit.2020.100801.

A. W. Ishlah, S. Sudarno, and P. Kartikasari, “Implementasi Gridsearchcv Pada Support Vector Regression (SVR) Untuk Peramalan Harga Saham,” J. Gaussian, vol. 12, no. 2, pp. 276–286, Jul. 2023, doi: 10.14710/j.gauss.12.2.276-286.

A. Zaiem dan N. Charibaldi, “Komparasi Fungsi Kernel Metode Support Vector Machine untuk Analisis Sentimen Instagram dan Twit-ter ( Studi Kasus : Komisi Pemberantasan Korupsi ),” J. Sarj. Tek. Inform., vol. 9, no. 2, hal. 33–42, 2021, [Daring]. Tersedia pada: https://doi.org/10.12928/jstie.v8i3.xxx.

Downloads

Published

29-06-2025

Issue

Section

Articles

How to Cite

[1]
2025. Multi-Label Classification for Opinion Mining in The Presidential Election using TF-IDF with NB And SVM. Jurnal ELTIKOM : Jurnal Teknik Elektro, Teknologi Informasi dan Komputer. 9, 1 (Jun. 2025), 35–46. DOI:https://doi.org/10.31961/eltikom.v9i1.1432.

Similar Articles

21-30 of 34

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)