Sentiment Analysis of Suicide on X Using Support Vector Machine and Naive Bayes Classifier Algorithms

Authors

DOI:

https://doi.org/10.29407/intensif.v9i1.23742

Keywords:

Suicide Awareness, Sentiment Analysis, Text Mining, Support Vector Machine, Naive Bayes Classifier

Abstract

Background: The World Health Organization (WHO) defines health as a state of physical, mental, and social well-being, not just the absence of disease. Mental health, essential for overall well-being, is often neglected, leading to disorders like depression, a major cause of suicide. In Indonesia, suicide cases have surged, with 971 reported from January to October 2023. Objective: This study aims to analyze public sentiment regarding the rise in suicide cases in Indonesia using sentiment analysis methods, specifically Support Vector Machine (SVM) and Naive Bayes Classifier (NBC). The findings are expected to raise public awareness and provide policy recommendations to support mental health initiatives. Methods: One method used to understand public perception regarding the issue of suicide is text mining. This research employs text mining techniques with the Support Vector Machine (SVM) and Naive Bayes Classifier algorithms to analyze public sentiment related to suicide cases in Indonesia. Data was collected from tweets on social media platform X using crawling methods with snscrape and Python, totaling 1,175 tweets. Results: The results indicate that the Linear SVM model achieved higher accuracy than Naive Bayes in classifying tweet sentiments, with an accuracy rate of 80%. Conclusion: The SVM algorithm with a linear kernel achieved 80% accuracy and an identical ROC-AUC score. Word cloud visualization highlighted terms like "kill," "self," "depression," and "stress" as key negative sentiments. This study aims to raise public awareness and support better mental health policies in Indonesia.

Downloads

Download data is not yet available.

Author Biographies

  • M. Fariz Fadillah Mardianto, Universitas Airlangga

    Statistics, Universitas Airlangga

  • Bagas Shata Pratama, Universitas Airlangga

    Statistics, Universitas Airlangga

  • Marfa Audilla, Universitas Airlangga

    Statistics, Universitas Airlangga

  • Elly Pusporani, Universitas Airlangga

    Universitas Airlangga

References

World Health Organization, Basic documents: forty-ninth edition (including amendments adopted up to 31 May 2019). Geneva: World Health Organization, 2020.

S. Gautam, A. Jain, J. Chaudhary, M. Gautam, M. Gaur, and S. Grover, “Concept of mental health and mental well-being, it’s determinants and coping strategies,” Indian J Psychiatry, vol. 66, no. Suppl 2, pp. S231–S244, Jan. 2024, doi: 10.4103/indianjpsychiatry.indianjpsychiatry_707_23. DOI: https://doi.org/10.4103/indianjpsychiatry.indianjpsychiatry_707_23

A. C. Logan, B. M. Berman, and S. L. Prescott, “Vitality Revisited: The Evolving Concept of Flourishing and Its Relevance to Personal and Public Health,” Int J Environ Res Public Health, vol. 20, no. 6, Mar. 2023, doi: 10.3390/ijerph20065065. DOI: https://doi.org/10.3390/ijerph20065065

A. Delle Fave, M. P. Wissing, and I. Brdar, “Beyond polarization towards dynamic balance: harmony as the core of mental health,” Front Psychol, vol. 14, 2023, doi: 10.3389/fpsyg.2023.1177657. DOI: https://doi.org/10.3389/fpsyg.2023.1177657

D. Jian-peng, L. Hang, P. Xiao-Ling, Z. Chao-Ni, Y. Tian-Huai, and J. Xian-Min, “Research progress of quantum memory,” Acta Physica Sinica, 2019, [Online]. Available: https://api.semanticscholar.org/CorpusID:216696796

S. Bachmann, “Epidemiology of suicide and the psychiatric perspective,” Jul. 06, 2018, MDPI AG. doi: 10.3390/ijerph15071425. DOI: https://doi.org/10.3390/ijerph15071425

A. Kupferberg and G. Hasler, “The Social Cost of Depression: Investigating the Impact of Impaired Social Emotion Regulation, Social Cognition, and Interpersonal Behavior on Social Functioning,” J Affect Disord Rep, vol. 14, Dec. 2023, doi: 10.1016/j.jadr.2023.100631. DOI: https://doi.org/10.1016/j.jadr.2023.100631

M. A. Rizaty, “Kasus Bunuh Diri di Indonesia Alami Tren Meningkat,” https://dataindonesia.id/varia/detail/kasus-bunuh-diri-di-indonesia-alami-tren-meningkat.

S. VijayGaikwad, A. Chaugule, and P. Patil, “Text Mining Methods and Techniques,” Int J Comput Appl, vol. 85, no. 17, pp. 42–45, Jan. 2014, doi: 10.5120/14937-3507. DOI: https://doi.org/10.5120/14937-3507

J. West and M. Bhattacharya, “Intelligent Financial Fraud Detection: A Comprehensive Review,” Comput Secur, vol. 57, pp. 47–66, Mar. 2016, doi: 10.1016/j.cose.2015.09.005. DOI: https://doi.org/10.1016/j.cose.2015.09.005

E. E. Pratama and R. Lestika Atmi, “A Text Mining Implementation Based on Twitter Data to Analyse Information Regarding Corona Virus in Indonesia,” Journal of Computers for Society, vol. 1, no. 1, pp. 91–100, 2020, doi: 10.17509/jcs.v1i1.25502.

N. Makhdom, H. N. Verma, and A. K. Yadav, “A Review on Sentiment and Emotion Analysis for Computational Literary Studies,” International Journal of Scientific Research in Computer Science, Engineering and Information Technology, vol. 10, no. 2, pp. 107–119, Mar. 2024, doi: 10.32628/CSEIT241029. DOI: https://doi.org/10.32628/CSEIT241029

W. Medhat, A. Hassan, and H. Korashy, “Sentiment Analysis Algorithms and Applications: A survey,” Ain Shams Engineering Journal, vol. 5, no. 4, pp. 1093–1113, Dec. 2014, doi: 10.1016/j.asej.2014.04.011. DOI: https://doi.org/10.1016/j.asej.2014.04.011

K. Aulia and L. Amelia, “Analisis SentimenTwitter pada Isu Mental Health dengan Algoritma Klasfikasi Naive Bayes,” Jurnal Siliwangi, vol. 6, no. 2, pp. 60–65, 2020, doi: 10.37058/jssainstek.v6i2.2525.

D. A. Pangestu, “Analisis Sentimen Terhadap Opini Publik Tentang Kesehatan Mental Selama Pandemi Covid-19 Di Media Sosial Twitter Menggunakan Naive Bayes Classifier Dan Support Vector Machine (Studi Kasus : Data Opini Twitter Tentang Kesehatan Mental Selama Pandemi COVID-19 Tahun 2020 di Indonesia),” Universitas Islam Indonesia, Sleman, 2020.

K. Yan, D. Arisandi, and T. Tony, “Analisis Sentimen Komentar Netizen Twitter terhadap Kesehatan Mental Masyarakat Indonesia,” Jurnal Ilmu Komputer dan Sistem Informasi, vol. 10, no. 1, Mar. 2022, doi: 10.24912/jiksi.v10i1.17865. DOI: https://doi.org/10.24912/jiksi.v10i1.17865

D. Febrianti and N. Husniawati, “Hubungan Tingkat Depresi dan Faktor Resiko Ide Bunuh Diri pada Remaja SMPN,” Jurnal Ilmiah Kesehatan, vol. 13, no. 1, pp. 85–94, Mar. 2021, doi: 10.37012/jik.v13i1.422. DOI: https://doi.org/10.37012/jik.v13i1.422

Y. D. Austria, M. L. Goh, L. Sta. Maria Jr., J.-A. Lalata, J. E. Goh, and H. Vicente, “Comparison of Machine Learning Algorithms in Breast Cancer Prediction Using the Coimbra Dataset,” International journal of simulation: systems, science & technology, pp. 231–238, Jul. 2019, doi: 10.5013/IJSSST.a.20.S2.23. DOI: https://doi.org/10.5013/IJSSST.a.20.S2.23

I. H. Sarker, “Machine Learning: Algorithms, Real-World Applications and Research Directions,” May 01, 2021, Springer. doi: 10.1007/s42979-021-00592-x. DOI: https://doi.org/10.20944/preprints202103.0216.v1

J. V. Critien, A. Gatt, and J. Ellul, “Bitcoin price change and trend prediction through twitter sentiment and data volume,” Financial Innovation, vol. 8, no. 1, Dec. 2022, doi: 10.1186/s40854-022-00352-7. DOI: https://doi.org/10.1186/s40854-022-00352-7

L. Havrlant and V. Kreinovich, “A Simple Probabilistic Explanation of Term Frequency-Inverse Document Frequency (TF-IDF) Heuristic (and Variations Motivated by this explanation),” Int J Gen Syst, vol. 46, no. 1, pp. 27–36, Jan. 2017, doi: 10.1080/03081079.2017.1291635. DOI: https://doi.org/10.1080/03081079.2017.1291635

R. Darman, “Analisis Sentimen Respons Twitter terhadap Persyaratan Badan Penyelenggara Jaminan Sosial (BPJS) di Kantor Pertanahan,” Widya Bhumi, vol. 3, no. 2, pp. 113–136, Oct. 2023, doi: 10.31292/wb.v3i2.61. DOI: https://doi.org/10.31292/wb.v3i2.61

R. Alsini, “Analysis of Real Time Twitter Sentiments using Deep Learning Models,” Journal of Applied Data Sciences, vol. 4, no. 4, pp. 480–489, Dec. 2023, doi: 10.47738/jads.v4i4.146. DOI: https://doi.org/10.47738/jads.v4i4.146

P. E. Sumolang and W. Maharani, “Depression Detection on Twitter Using Bidirectional Long Short Term Memory,” Building of Informatics, Technology and Science (BITS), vol. 4, no. 2, pp. 369–376, Sep. 2022, doi: 10.47065/bits.v4i2.1850. DOI: https://doi.org/10.47065/bits.v4i2.1850

M. Siino, I. Tinnirello, and M. La Cascia, “Is Text Preprocessing Still Worth the Time? A Comparative Survey on the Influence of Popular Preprocessing Methods on Transformers and Traditional Classifiers,” Inf Syst, vol. 121, Mar. 2024, doi: 10.1016/j.is.2023.102342. DOI: https://doi.org/10.1016/j.is.2023.102342

S. J. Pipin, F. M. Sinaga, S. Winardi, and M. N. Hakim, “Sentiment Analysis Classification of ChatGPT on Twitter Big Data in Indonesia Using Fast R-CNN,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 7, no. 4, p. 2137, Oct. 2023, doi: 10.30865/mib.v7i4.6816. DOI: https://doi.org/10.30865/mib.v7i4.6816

Afiyati, E. Winarko, and A. Cherid, “Recognizing the sarcastic statement on WhatsApp Group with Indonesian language text,” in 2017 International Conference on Broadband Communication, Wireless Sensors and Powering (BCWSP), IEEE, Nov. 2017, pp. 1–6. doi: 10.1109/BCWSP.2017.8272579. DOI: https://doi.org/10.1109/BCWSP.2017.8272579

N. Shahid, M. U. Ilyas, J. S. Alowibdi, and N. R. Aljohani, “Word Cloud Segmentation for Simplified Exploration of Trending Topics on Twitter,” IET Software, vol. 11, no. 5, pp. 214–220, Oct. 2017, doi: 10.1049/iet-sen.2016.0307. DOI: https://doi.org/10.1049/iet-sen.2016.0307

W. Yulita, M. C. Untoro, M. Praseptiawan, I. F. Ashari, A. Afriansyah, and A. N. Bin Che Pee, “Automatic Scoring Using Term Frequency Inverse Document Frequency Document Frequency and Cosine Similarity,” Scientific Journal of Informatics, vol. 10, no. 2, pp. 93–104, Apr. 2023, doi: 10.15294/sji.v10i2.42209. DOI: https://doi.org/10.15294/sji.v10i2.42209

M. I. Alfarizi, L. Syafaah, and M. Lestandy, “Emotional Text Classification Using TF-IDF (Term Frequency-Inverse Document Frequency) And LSTM (Long Short-Term Memory),” JUITA : Jurnal Informatika, vol. 10, no. 2, pp. 225–232, Nov. 2022, doi: 10.30595/juita.v10i2.13262. DOI: https://doi.org/10.30595/juita.v10i2.13262

L. Yuan, S. Yu, Z. Yang, M. Duan, and K. Li, “A Data Balancing Approach Based on Generative Adversarial Network,” Future Generation Computer Systems, vol. 141, pp. 768–776, Apr. 2023, doi: 10.1016/j.future.2022.12.024. DOI: https://doi.org/10.1016/j.future.2022.12.024

D. Elreedy and A. F. Atiya, “A Comprehensive Analysis of Synthetic Minority Oversampling Technique (SMOTE) for Handling Class Imbalance,” Inf Sci (N Y), vol. 505, pp. 32–64, Dec. 2019, doi: 10.1016/j.ins.2019.07.070. DOI: https://doi.org/10.1016/j.ins.2019.07.070

D. Elreedy, A. F. Atiya, and F. Kamalov, “A Theoretical Distribution Analysis of Synthetic Minority Oversampling Technique (SMOTE) for Imbalanced Learning,” Mach Learn, vol. 113, no. 7, pp. 4903–4923, Jul. 2024, doi: 10.1007/s10994-022-06296-4. DOI: https://doi.org/10.1007/s10994-022-06296-4

Downloads

PlumX Metrics

Published

2025-02-23

How to Cite

[1]
“Sentiment Analysis of Suicide on X Using Support Vector Machine and Naive Bayes Classifier Algorithms”, INTENSIF: J. Ilm. Penelit. dan Penerap. Tek. Sist. Inf., vol. 9, no. 1, pp. 60–75, Feb. 2025, doi: 10.29407/intensif.v9i1.23742.