Jurnal ICT : Information and Communication Technologies
Vol. 17 No. 1 (2026): April, Jurnal ICT : Information and Communication Technologies

Analysis of Public Sentiment Toward Mental Health on Social Media Using Naïve Bayes

Wiji Lestari Sitorus (Universitas Muhammadiyah Sumatera Utara, Medan, Indonesia)
Zuli Agustina Gultom (Universitas Muhammadiyah Sumatera Utara, Medan, Indonesia)



Article Info

Publish Date
30 Apr 2026

Abstract

Mental health is a global issue that has garnered significant public attention on social media. The platform X (formerly Twitter) is widely used by the public to openly express emotional conditions, yielding vast amounts of unstructured textual data. This research aims to analyze public sentiment regarding mental health issues on social media X using the Multinomial Naïve Bayes algorithm combined with Term Frequency-Inverse Document Frequency (TF-IDF) word weighting. The dataset consists of 9,000 tweets written in Indonesian, collected between February 15 and 27, 2025, using the keywords kesehatan_mental (mental health), stress (stress), kecemasan (anxiety), and depresi (depression). To enhance data quality, a comprehensive text preprocessing pipeline was implemented, including cleaning, case folding, word normalization (using a 59-entry mapping dictionary), tokenizing, stopword removal, and stemming. The performance of the classification model was evaluated using a confusion matrix on 1,800 test data. The results demonstrate that the Multinomial Naïve Bayes model achieved a high accuracy of 90.78% and a macro average F1-score of 90.75%. Specifically, the positive sentiment class yielded a precision of 96.22% and a recall of 84.89%, while the negative sentiment class achieved a precision of 86.48% and a recall of 96.67%. Furthermore, this study integrates the classification model into a web-based system equipped with an explainability feature that visualizes word contributions to the sentiment outcomes. This research contributes an interpretative, informative, and efficient computational approach for monitoring public sentiment trends toward mental health issues on Indonesian social media.

Copyrights © 2026






Journal Info

Abbrev

JICT

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management Economics, Econometrics & Finance Electrical & Electronics Engineering Engineering Library & Information Science Mechanical Engineering

Description

Jurnal ICT : Information and Communication Technologies (p-ISSN: 2086-7867) is a scientific journal and open access journal published by Pusat Penelitian Teknoligi, Marqcha Institute, Indonesia. Jurnal JICT covers the field of Informatics, Computer Science, Information Technology and ...