Issue

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Sentiment Analysis on Social Media Uusing CNN-RNN Hybrid: A Case Study of Indonesian Presidential Candidate
Corresponding Author(s) : Slamet Riyadi, Ph.D
Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control,
Vol. 10, No. 2, May 2025
Abstract
Research on sentiment analysis for Presidential Candidate 01 on social media cannot be ignored because there is no in-depth understanding of public perceptions and opinions circulating online. The CNN model is quite commonly used for sentiment analysis; however, this model still has quite low accuracy so modifications need to be made. This research aims to increase the accuracy of sentiment analysis through the application of a modified Convolutional Neural Network (CNN) method. The research process includes collecting tweet data related to Presidential Candidate 01 using crawling techniques, data preprocessing, sentiment labeling, data balancing, as well as dividing the dataset into training, validation and test data. The CNN model is modified with additional layers to improve the performance. The model is evaluated by measuring its accuracy, precision, recall, and F1 Score. The research results show that the modified CNN-RNN Hybrid model with the Upsampling method achieves an accuracy of 94% and F1 Score of 0.95, while the CNN-RNN Hybrid model has an accuracy of 86% and F1 Score of 0.82, the CNN Model has an accuracy of 90% and F1 Score of 0.88, and the RNN model has an accuracy of 88% and F1 Score of 0.84, which are higher compared to the Naïve Bayes and LSTM methods used in the previous research. Modifying the CNN method can significantly increase the accuracy of sentiment analysis for Presidential Candidate 01, so that it can become a more effective tool for understanding public perceptions and improving political campaign strategies.
Keywords
Download Citation
Endnote/Zotero/Mendeley (RIS)BibTeX
- F. Aftab et al., “A Comprehensive Survey on Sentiment Analysis Techniques,” International Journal of Technology, vol. 14, no. 6, pp. 1288–1298, 2023, doi: 10.14716/ijtech.v14i6.6632.
- M. R. Fais Sya’ bani, U. Enri, and T. N. Padilah, “Analisis Sentimen Terhadap Bakal Calon Presiden 2024 Dengan Algoritme Naïve Bayes,” JURIKOM (Jurnal Riset Komputer), vol. 9, no. 2, p. 265, Apr. 2022, doi: 10.30865/jurikom.v9i2.3989.
- M. Z. Rahman, Y. A. Sari, and N. Yudistira, “Analisis Sentimen Tweet COVID-19 menggunakan Word Embedding dan Metode Long Short-Term Memory (LSTM),” 2021. [Online]. Available: http://j-ptiik.ub.ac.id
- P. L. Parameswari and Prihandoko, “PENGGUNAAN CONVOLUTIONAL NEURAL NETWORK UNTUK ANALISIS SENTIMEN OPINI LINGKUNGAN HIDUP KOTA DEPOK DI TWITTER,” Jurnal Ilmiah Teknologi dan Rekayasa, vol. 27, no. 1, pp. 29–42, 2022, doi: 10.35760/tr.2022.v27i1.4671.
- D. Hidayatul Qudsi, J. Hakim Lubis, K. Umam Syaliman, and N. Fadilah Najwa, “ANALISIS SENTIMEN PADA DATA SARAN MAHASISWA TERHADAP KINERJA DEPARTEMEN DI PERGURUAN TINGGI MENGGUNAKAN CONVOLUTIONAL NEURAL NETWORK,” 2021, doi: 10.25126/jtiik.202184842.
- M. Rhanoui, M. Mikram, S. Yousfi, and S. Barzali, “A CNN-BiLSTM Model for Document-Level Sentiment Analysis,” Mach Learn Knowl Extr, vol. 1, no. 3, pp. 832–847, Sep. 2019, doi: 10.3390/make1030048.
- F. M. Shiri, “A Comprehensive Overview and Comparative Analysis on Deep Learning Models: CNN, RNN, LSTM, GRU,” 2023.
- H. Dhika et al., “Model Prediksi Jenis Hewan dengan Metode Convolution Neural Network,” 2020. [Online]. Available: http://www.kaggle.com/c/dogs-vs-
- Sartini, “ANALISIS SENTIMEN TWITTER BAHASA INDONESIA MENGGUNAKAN ALGORITMA CONVOLUTIONAL NEURAL NETWORK,” 2020.
- N. L. P. C. Savitri, R. A. Rahman, R. Venyutzky, and N. A. Rakhmawati, “Analisis Klasifikasi Sentimen Terhadap Sekolah Daring pada Twitter Menggunakan Supervised Machine Learning,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 7, no. 1, Apr. 2021, doi: 10.28932/jutisi.v7i1.3216.
- D. Duei Putri, G. F. Nama, and W. E. Sulistiono, “Analisis Sentimen Kinerja Dewan Perwakilan Rakyat (DPR) Pada Twitter Menggunakan Metode Naive Bayes Classifier,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 10, no. 1, Jan. 2022, doi: 10.23960/jitet.v10i1.2262.
- R. Nooraeni, A. Fikri Fadhilah I, H. Dwi, S. Fatimatul, S. Pertiwi, and Y. Ronaldias, “Analisis Sentimen Data Twitter Mengenai Isu RUU KPK Dengan Metode Support Vector Machine (SVM),” vol. 22, no. 1, 2020, doi: 10.31294/p.v21i2.
- S. N. Listyarini and D. A. Anggoro, “Analisis Sentimen Pilkada di Tengah Pandemi Covid-19 Menggunakan Convolution Neural Network (CNN),” Jurnal Pendidikan dan Teknologi Indonesia, vol. 1, no. 7, pp. 261–268, Jul. 2021, doi: 10.52436/1.jpti.60.
- P. Arsi and R. Waluyo, “ANALISIS SENTIMEN WACANA PEMINDAHAN IBU KOTA INDONESIA MENGGUNAKAN ALGORITMA SUPPORT VECTOR MACHINE (SVM),” vol. 8, no. 1, pp. 147–156, 2021, doi: 10.25126/jtiik.202183944.
- S. Dey, S. Wasif, D. S. Tonmoy, S. Sultana, J. Sarkar, and M. Dey, “A Comparative Study of Support Vector Machine and Naive Bayes Classifier for Sentiment Analysis on Amazon Product Reviews,” in 2020 International Conference on Contemporary Computing and Applications, IC3A 2020, Institute of Electrical and Electronics Engineers Inc., Feb. 2020, pp. 217–220. doi: 10.1109/IC3A48958.2020.233300.
- A. DI SENTIMEN RESPONS TWITTER TERHADAP PERSYARATAN BADAN PENYELENGGARA JAMINAN SOSIAL KANTOR PERTANAHAN Ridho Darman Kantor Pertanahan Kabupaten Agam, K. Agraria dan Tata Ruang, B. Lubuk Basung, K. Agam, and P. Sumatera Barat, “JURNAL WIDYA BHUMI,” 2023.
- M. Li and Y. Shi, “Sentiment analysis and prediction model based on Chinese government affairs microblogs,” Heliyon, vol. 9, no. 8, Aug. 2023, doi: 10.1016/j.heliyon.2023.e19091.
- M. Işik and H. Dağ, “The impact of text preprocessing on the prediction of review ratings,” 2020, Turkiye Klinikleri. Doi: 10.3906/elk-1907-46.
- J. Khatib Sulaiman, D. Setiyawati, N. Cahyono, and U. Amikom Yogyakarta, “Analisa Sentimen Pengguna Sosial Media Twitter Terhadap Perokok di Indonesia,” Indonesian Journal of Computer Science Attribution, vol. 12, no. 1, pp. 2023–262, 2023.
- S. Dewi and D. B. Arianto, “TWITTER SENTIMENT ANALYSIS TOWARDS QATAR AS HOST OF THE 2022 WORLD CUP USING TEXTBLOB”, [Online]. Available: http://ijsr.internationaljournallabs.com/index.php/ijsr
- C. Magnolia, A. Nurhopipah, D. Bagus, and A. Kusuma, “Edu Komputika Journal Penanganan Imbalanced Dataset untuk Klasifikasi Komentar Program Kampus Merdeka Pada Aplikasi Twitter,” 2022. [Online]. Available: http://journal.unnes.ac.id/sju/index.php/edukom
- J. Prasetya, “Leibniz : Jurnal Matematika PENERAPAN KLASIFIKASI NAIVE BAYES DENGAN ALGORITMA RANDOM OVERSAMPLING DAN RANDOM UNDERSAMPLING PADA DATA TIDAK SEIMBANG CERVICAL CANCER RISK FACTORS,” vol. 2, no. 2.
- A. Q. Md, S. Kulkarni, C. J. Joshua, T. Vaichole, S. Mohan, and C. Iwendi, “Enhanced Preprocessing Approach Using Ensemble Machine Learning Algorithms for Detecting Liver Disease,” Biomedicines, vol. 11, no. 2, Feb. 2023, doi: 10.3390/biomedicines11020581.
- L. Geni, E. Yulianti, and D. I. Sensuse, “Sentiment Analysis of Tweets Before the 2024 Elections in Indonesia Using IndoBERT Language Models,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika (JITEKI), vol. 9, no. 3, pp. 746–757, 2023, doi: 10.26555/jiteki.v9i3.26490.
- M. M. A. Monshi, J. Poon, V. Chung, and F. M. Monshi, “CovidXrayNet: Optimizing data augmentation and CNN hyperparameters for improved COVID-19 detection from CXR,” Comput Biol Med, vol. 133, Jun. 2021, doi: 10.1016/j.compbiomed.2021.104375.
- M. A. Nurrohmat and A. SN, “Sentiment Analysis of Novel Review Using Long Short-Term Memory Method,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 13, no. 3, p. 209, Jul. 2019, doi: 10.22146/ijccs.41236.
- F. A. Irawan and D. A. Rochmah, “Penerapan Algoritma CNN Untuk Mengetahui Sentimen Masyarakat Terhadap Kebijakan Vaksin Covid-19,” JURNAL INFORMATIKA, vol. 9, no. 2, 2022, [Online]. Available: http://ejournal.bsi.ac.id/ejurnal/index.php/ji
- R. Yacouby Amazon Alexa and D. Axman Amazon Alexa, “Probabilistic Extension of Precision, Recall, and F1-score for More Thorough Evaluation of Classification Models.”
- S. Pavlitskaya, J. Oswald, and J. M. Zöllner, “Measuring Overfitting in Convolutional Neural Networks using Adversarial Perturbations and Label Noise,” Sep. 2022, [Online]. Available: http://arxiv.org/abs/2209.13382
- C. Garbin, X. Zhu, and O. Marques, “Dropout vs. batch normalization: an empirical study of their impact on deep learning,” Multimed Tools Appl, vol. 79, no. 19–20, pp. 12777–12815, May 2020, doi: 10.1007/s11042-019-08453-9.
References
F. Aftab et al., “A Comprehensive Survey on Sentiment Analysis Techniques,” International Journal of Technology, vol. 14, no. 6, pp. 1288–1298, 2023, doi: 10.14716/ijtech.v14i6.6632.
M. R. Fais Sya’ bani, U. Enri, and T. N. Padilah, “Analisis Sentimen Terhadap Bakal Calon Presiden 2024 Dengan Algoritme Naïve Bayes,” JURIKOM (Jurnal Riset Komputer), vol. 9, no. 2, p. 265, Apr. 2022, doi: 10.30865/jurikom.v9i2.3989.
M. Z. Rahman, Y. A. Sari, and N. Yudistira, “Analisis Sentimen Tweet COVID-19 menggunakan Word Embedding dan Metode Long Short-Term Memory (LSTM),” 2021. [Online]. Available: http://j-ptiik.ub.ac.id
P. L. Parameswari and Prihandoko, “PENGGUNAAN CONVOLUTIONAL NEURAL NETWORK UNTUK ANALISIS SENTIMEN OPINI LINGKUNGAN HIDUP KOTA DEPOK DI TWITTER,” Jurnal Ilmiah Teknologi dan Rekayasa, vol. 27, no. 1, pp. 29–42, 2022, doi: 10.35760/tr.2022.v27i1.4671.
D. Hidayatul Qudsi, J. Hakim Lubis, K. Umam Syaliman, and N. Fadilah Najwa, “ANALISIS SENTIMEN PADA DATA SARAN MAHASISWA TERHADAP KINERJA DEPARTEMEN DI PERGURUAN TINGGI MENGGUNAKAN CONVOLUTIONAL NEURAL NETWORK,” 2021, doi: 10.25126/jtiik.202184842.
M. Rhanoui, M. Mikram, S. Yousfi, and S. Barzali, “A CNN-BiLSTM Model for Document-Level Sentiment Analysis,” Mach Learn Knowl Extr, vol. 1, no. 3, pp. 832–847, Sep. 2019, doi: 10.3390/make1030048.
F. M. Shiri, “A Comprehensive Overview and Comparative Analysis on Deep Learning Models: CNN, RNN, LSTM, GRU,” 2023.
H. Dhika et al., “Model Prediksi Jenis Hewan dengan Metode Convolution Neural Network,” 2020. [Online]. Available: http://www.kaggle.com/c/dogs-vs-
Sartini, “ANALISIS SENTIMEN TWITTER BAHASA INDONESIA MENGGUNAKAN ALGORITMA CONVOLUTIONAL NEURAL NETWORK,” 2020.
N. L. P. C. Savitri, R. A. Rahman, R. Venyutzky, and N. A. Rakhmawati, “Analisis Klasifikasi Sentimen Terhadap Sekolah Daring pada Twitter Menggunakan Supervised Machine Learning,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 7, no. 1, Apr. 2021, doi: 10.28932/jutisi.v7i1.3216.
D. Duei Putri, G. F. Nama, and W. E. Sulistiono, “Analisis Sentimen Kinerja Dewan Perwakilan Rakyat (DPR) Pada Twitter Menggunakan Metode Naive Bayes Classifier,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 10, no. 1, Jan. 2022, doi: 10.23960/jitet.v10i1.2262.
R. Nooraeni, A. Fikri Fadhilah I, H. Dwi, S. Fatimatul, S. Pertiwi, and Y. Ronaldias, “Analisis Sentimen Data Twitter Mengenai Isu RUU KPK Dengan Metode Support Vector Machine (SVM),” vol. 22, no. 1, 2020, doi: 10.31294/p.v21i2.
S. N. Listyarini and D. A. Anggoro, “Analisis Sentimen Pilkada di Tengah Pandemi Covid-19 Menggunakan Convolution Neural Network (CNN),” Jurnal Pendidikan dan Teknologi Indonesia, vol. 1, no. 7, pp. 261–268, Jul. 2021, doi: 10.52436/1.jpti.60.
P. Arsi and R. Waluyo, “ANALISIS SENTIMEN WACANA PEMINDAHAN IBU KOTA INDONESIA MENGGUNAKAN ALGORITMA SUPPORT VECTOR MACHINE (SVM),” vol. 8, no. 1, pp. 147–156, 2021, doi: 10.25126/jtiik.202183944.
S. Dey, S. Wasif, D. S. Tonmoy, S. Sultana, J. Sarkar, and M. Dey, “A Comparative Study of Support Vector Machine and Naive Bayes Classifier for Sentiment Analysis on Amazon Product Reviews,” in 2020 International Conference on Contemporary Computing and Applications, IC3A 2020, Institute of Electrical and Electronics Engineers Inc., Feb. 2020, pp. 217–220. doi: 10.1109/IC3A48958.2020.233300.
A. DI SENTIMEN RESPONS TWITTER TERHADAP PERSYARATAN BADAN PENYELENGGARA JAMINAN SOSIAL KANTOR PERTANAHAN Ridho Darman Kantor Pertanahan Kabupaten Agam, K. Agraria dan Tata Ruang, B. Lubuk Basung, K. Agam, and P. Sumatera Barat, “JURNAL WIDYA BHUMI,” 2023.
M. Li and Y. Shi, “Sentiment analysis and prediction model based on Chinese government affairs microblogs,” Heliyon, vol. 9, no. 8, Aug. 2023, doi: 10.1016/j.heliyon.2023.e19091.
M. Işik and H. Dağ, “The impact of text preprocessing on the prediction of review ratings,” 2020, Turkiye Klinikleri. Doi: 10.3906/elk-1907-46.
J. Khatib Sulaiman, D. Setiyawati, N. Cahyono, and U. Amikom Yogyakarta, “Analisa Sentimen Pengguna Sosial Media Twitter Terhadap Perokok di Indonesia,” Indonesian Journal of Computer Science Attribution, vol. 12, no. 1, pp. 2023–262, 2023.
S. Dewi and D. B. Arianto, “TWITTER SENTIMENT ANALYSIS TOWARDS QATAR AS HOST OF THE 2022 WORLD CUP USING TEXTBLOB”, [Online]. Available: http://ijsr.internationaljournallabs.com/index.php/ijsr
C. Magnolia, A. Nurhopipah, D. Bagus, and A. Kusuma, “Edu Komputika Journal Penanganan Imbalanced Dataset untuk Klasifikasi Komentar Program Kampus Merdeka Pada Aplikasi Twitter,” 2022. [Online]. Available: http://journal.unnes.ac.id/sju/index.php/edukom
J. Prasetya, “Leibniz : Jurnal Matematika PENERAPAN KLASIFIKASI NAIVE BAYES DENGAN ALGORITMA RANDOM OVERSAMPLING DAN RANDOM UNDERSAMPLING PADA DATA TIDAK SEIMBANG CERVICAL CANCER RISK FACTORS,” vol. 2, no. 2.
A. Q. Md, S. Kulkarni, C. J. Joshua, T. Vaichole, S. Mohan, and C. Iwendi, “Enhanced Preprocessing Approach Using Ensemble Machine Learning Algorithms for Detecting Liver Disease,” Biomedicines, vol. 11, no. 2, Feb. 2023, doi: 10.3390/biomedicines11020581.
L. Geni, E. Yulianti, and D. I. Sensuse, “Sentiment Analysis of Tweets Before the 2024 Elections in Indonesia Using IndoBERT Language Models,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika (JITEKI), vol. 9, no. 3, pp. 746–757, 2023, doi: 10.26555/jiteki.v9i3.26490.
M. M. A. Monshi, J. Poon, V. Chung, and F. M. Monshi, “CovidXrayNet: Optimizing data augmentation and CNN hyperparameters for improved COVID-19 detection from CXR,” Comput Biol Med, vol. 133, Jun. 2021, doi: 10.1016/j.compbiomed.2021.104375.
M. A. Nurrohmat and A. SN, “Sentiment Analysis of Novel Review Using Long Short-Term Memory Method,” IJCCS (Indonesian Journal of Computing and Cybernetics Systems), vol. 13, no. 3, p. 209, Jul. 2019, doi: 10.22146/ijccs.41236.
F. A. Irawan and D. A. Rochmah, “Penerapan Algoritma CNN Untuk Mengetahui Sentimen Masyarakat Terhadap Kebijakan Vaksin Covid-19,” JURNAL INFORMATIKA, vol. 9, no. 2, 2022, [Online]. Available: http://ejournal.bsi.ac.id/ejurnal/index.php/ji
R. Yacouby Amazon Alexa and D. Axman Amazon Alexa, “Probabilistic Extension of Precision, Recall, and F1-score for More Thorough Evaluation of Classification Models.”
S. Pavlitskaya, J. Oswald, and J. M. Zöllner, “Measuring Overfitting in Convolutional Neural Networks using Adversarial Perturbations and Label Noise,” Sep. 2022, [Online]. Available: http://arxiv.org/abs/2209.13382
C. Garbin, X. Zhu, and O. Marques, “Dropout vs. batch normalization: an empirical study of their impact on deep learning,” Multimed Tools Appl, vol. 79, no. 19–20, pp. 12777–12815, May 2020, doi: 10.1007/s11042-019-08453-9.