JOURNAL OF APPLIED INFORMATICS AND COMPUTING
Vol. 10 No. 3 (2026): June 2026

Sentiment Classification of Health Education YouTube Comments Using IndoBERT Embeddings with Logistic Regression and Naïve Bayes

Andre Septa Wijaya (Universitas Dian Nuswantoro)
Amiq Fahmi (Universitas Dian Nuswantoro)
Yuventius Tyas Catur Pramudi (Universitas Dian Nuswantoro)



Article Info

Publish Date
18 Jun 2026

Abstract

Class imbalance is a common issue in sentiment classification of social media data, particularly in mental health–related discussions where certain sentiment classes are underrepresented. This study focuses on sentiment classification of mental health–related YouTube comments by utilizing IndoBERT as a pre-trained language model to generate contextual text embeddings. Sentiment classification is subsequently performed using conventional machine learning algorithms, namely Logistic Regression and Naïve Bayes. The research framework includes data collection through the YouTube Data API, text preprocessing, semi-manual sentiment labeling into positive, neutral, and negative classes, and dataset partitioning using an 80:20 train–test split. To address class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) is applied exclusively to the training data to prevent data leakage. Feature representation is obtained from IndoBERT embeddings with a dimensionality of 768. Model performance is evaluated using accuracy, precision, recall, and F1-score. Experimental results show that Logistic Regression outperforms Naïve Bayes, achieving an accuracy of 78%, compared to 56% for Naïve Bayes. This indicates that Logistic Regression is more effective in handling dense contextual embeddings generated by transformer-based models. Overall, the findings demonstrate that combining contextual embeddings with data balancing techniques can improve sentiment classification performance in mental health–related social media analysis, particularly in low-resource language settings.

Copyrights © 2026






Journal Info

Abbrev

JAIC

Publisher

Subject

Computer Science & IT

Description

Journal of Applied Informatics and Computing (JAIC) Volume 2, Nomor 1, Juli 2018. Berisi tulisan yang diangkat dari hasil penelitian di bidang Teknologi Informatika dan Komputer Terapan dengan e-ISSN: 2548-9828. Terdapat 3 artikel yang telah ditelaah secara substansial oleh tim editorial dan ...