Comparison of Naive Bayes and SVM Methods for Identifying Anxiety Based on Social Media


  • Endri Rizki Nugraha * Mail Telkom University, Bandung, Indonesia
  • Warih Maharani Telkom University, Bandung, Indonesia
  • (*) Corresponding Author
Keywords: Anxiety; Naive Bayes; SVM; DASS-42; Sentiment Analysis; Social Media

Abstract

This research aims to detect anxiety patterns from social media posts using Naive Bayes (NB) and Support Vector Machine (SVM) algorithms. Tweets are extracted using Data Crawling techniques, then continued their way into labeling using Depression Anxiety Stress Scale (DASS-42) questionnaire along with Random Oversampler to balance out the unbalanced dataset and NB and SVM were chosen for their effectiveness in text sentiment classification. This study integrates textual features obtained from the Term Frequency-Inverse Document Frequency (TF-IDF) and Bag of Words (BoW) methods. The study compares the performance of these algorithms in detecting anxiety using datasets from the X platform. The comparison aims to identify the advantages and limitations of each method in handling textual sentiment data. This research aims to analyze sentiment data by calculating accuracy, recall, and F1-score to determine the most optimal performance outcome. The results indicate that the SVM with TF-IDF feature extraction achieved the highest accuracy of 72% and an average F1-Score of 61%, while the NB with BoW achieved 56% accuracy and an average F1-Score of 49%. These findings highlight the effectiveness of combining SVM and TF-IDF features which improve model effectiveness with SVM producing the best overall result in identifying anxiety from social media data.

Downloads

Download data is not yet available.

References

A. Trikandini and L. Kurniasari "Hubungan intensitas penggunaan media sosial dengan tingkat kecemasan pada mahasiswa UMKT." Borneo Studies and Research, vol. 3, no. 1, 2021.

A. Putra, D. Haeirudin, H. Khairunnisa, and R. Latifah, “Analisis Sentimen Masyarakat Terhadap Kebijakan PPKM Pada Media Sosial Twitter Menggunakan Algoritma Svm,” Seminar Nasional Sains dan Teknologi, p. 1. 2021.

M. M. Kenwood, N. H. Kalin, and H. Barbas, “The prefrontal cortex, pathological anxiety, and anxiety disorders,” Neuropsychopharmacology, vol. 47, no. 1, 2021, doi: 10.1038/s41386-021-01109-z.

R. Mukhlasin, “Dampak Negatif Media Sosial Terhadap Kesehatan Mental dalam Fotografi Ekspresi” Digilib Institut Seni Indonesia Yogyakarta, 2022. Available: https://digilib.isi.ac.id/13317/

N. Oktavia Hidayati et al., “Kecemasan Remaja Selama Pandemi Covid-19.” Jurnal Ilmu Keperawatan Jiwa, vol. 5, no. 2, 2022.

R. Fazal, L. Andraini, and T. Komputer, “Membandingkan Support Vector Machines Dan Naive Bayes Pada Analisis Sentimen Data Twitter.” Jurnal Portal Data 2, vol. 2, no. 10, 2022.

W. Ningsih, B. Alfianda, R. Rahmaddeni, and D. Wulandari, “Perbandingan Algoritma SVM dan Naïve Bayes dalam Analisis Sentimen Twitter pada Penggunaan Mobil Listrik di Indonesia,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 2, 2024, doi: 10.57152/malcom.v4i2.1253.

Moh. A. Al Fachri and U. Athiyah, “Komparasi Model Analisis Sentimen Pada Twitter Terhadap Kemahalan Minyak Goreng dengan Metode Naive Bayes dan Support Vector Machine,” Infotekmesin, vol. 14, no. 2, 2023, doi: 10.35970/infotekmesin.v14i2.1759.

Rani Yunita and Kamayani Mia, “Perbandingan Algoritma SVM Dan Naïve Bayes Pada Analisis Sentimen Kebijakan Penghapusan Kewajiban Skripsi,” Indonesian Journal of Computer Science, vol. 12, no. 5, 2023.

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, 2023, doi: 10.33022/ijcs.v12i1.3154.

R. Asokan, D. P. Ruiz, and S. Piramuthu, “Smart data intelligence : proceedings of ICSMDI 2024” Springer, 2024. doi: 10.1007/978-981-97-3191-6.

T. Agustiranti, A. Khalfani Izzati Kurdiana, B. Al Ghiffari, E. Dwi Juniar, and D. Gita Purnama, “Penerapan Naive Bayes Terhadap Sentimen Analisis Media Sosial Twitter Pengguna Kereta Cepat Jakarta-Bandung (Whoosh),” Jurnal Ilmu Komputer dan Sistem Informasi (JIKOMSI), vol. 7, no. 1, 2024.

S. R. Marsidi, “identification of Stress, Anxiety, and Depression Levels of Students in Preparation for the Exit Exam Competency Test,” Journal of Vocational Health Studies, vol. 5, no. 2, 2021, doi: 10.20473/jvhs.v5.i2.2021.87-93.

A. I. Kadhim, “Term Weighting for Feature Extraction on Twitter: A Comparison Between BM25 and TF-IDF,” in 2019 International Conference on Advanced Science and Engineering (ICOASE), 2019, doi: 10.1109/ICOASE.2019.8723825.

A. Putri Riani, N. Sulistyowati, T. Ridwan, and A. Voutama, "Klasifikasi Emosi Publik Terhadap Larangan Penggunaan Obat Sirup Menggunakan Algoritma Naive Bayes." METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi, vol. 7, no. 2, 2023, doi: 10.46880/jmika.Vol7No2.pp325-339.

L. Galke and A. Scherp, “Bag-of-Words vs. Graph vs. Sequence in Text Classification: Questioning the Necessity of Text-Graphs and the Surprising Strength of a Wide MLP,” arXiv 2021, Available: https://doi.org/10.48550/arXiv.2109.03777.

Y. HaCohen-Kerner, D. Miller, and Y. Yigal, “The influence of preprocessing on text classification using a bag-of-words representation,” PLoS One, vol. 15, no. 5, 2020, doi: 10.1371/journal.pone.0232525.

F. Amaliah, I. Kadek, and D. Nuryana, “Perbandingan Akurasi Metode Lexicon Based Dan Naive Bayes Classifier Pada Analisis Sentimen Pendapat Masyarakat Terhadap Aplikasi Investasi Pada Media Twitter,” Journal of Informatics and Computer Science (JINACS), vol. 3, No. 3 2022, https://doi.org/10.26740/jinacs.v3n03.p384-393.

D. Marutho, “Perbandingan Metode Naive Bayes, KNN, Decision Tree pada Laporan Water Level Jakarta” Jurnal Ilmiah Infokam vol. 15, no. 2, 2019, doi: 10.53845/infokam.v15i2.175

M. Imam Syafii, “Sentimen analisis Pada Media Sosial Twitter Menggunakan Metode Naive Bayes Classifier (NBC).” Jurnal Teknologi Pintar Vol. 2, no. 7, 2022.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Comparison of Naive Bayes and SVM Methods for Identifying Anxiety Based on Social Media

Dimensions Badge
Article History
Submitted: 2024-12-23
Published: 2025-03-01
Abstract View: 25 times
PDF Download: 9 times
How to Cite
Nugraha, E., & Maharani, W. (2025). Comparison of Naive Bayes and SVM Methods for Identifying Anxiety Based on Social Media. Building of Informatics, Technology and Science (BITS), 6(4), 2184-2192. https://doi.org/10.47065/bits.v6i4.6506
Issue
Section
Articles

Most read articles by the same author(s)

1 2 > >>