Main Content
Open Access Articles

Multi-Platform Sentiment Analysis of Diabetes Mellitus on X and TikTok Using K-Nearest Neighbor, Chi-Square Selection, and Oversampling

Main Article Content

  • Asti Devi Mutiara Khoirun Nisa1*
  • Noor Latifah2
  • R. Rhoedy Setiawan3

Article Sidebar

Abstract

Diabetes mellitus is a chronic health condition that is widely discussed by the public on social media, generating a large volume of opinions that are difficult to interpret manually. This study analyzes public sentiment toward Diabetes mellitus using data collected from X (Twitter) and TikTok. Text data were preprocessed (cleaning, slang normalization, stopword removal, and stemming) and duplicate entries were removed. Sentiment labels were generated automatically through a rule-based lexicon across four categories (positive, negative, neutral, and irrelevant/discarded), and the reliability of this automatic labeling was verified through manual validation of a stratified sample of 200 data points, measured using Cohen's Kappa. Positive and negative data were then weighted using TF-IDF, reduced using Chi-Square feature selection, balanced using SMOTE, and classified using K-Nearest Neighbor (KNN). Model performance was evaluated using accuracy, precision, recall, and F1-score, and compared across four scenarios: baseline KNN, KNN with Chi-Square, KNN with SMOTE, and the combined KNN+Chi-Square+SMOTE model. The manual validation of 198 valid samples produced an agreement accuracy of 59.60% and a Cohen's Kappa of 0.459 (moderate agreement), indicating that the main source of disagreement lies at the boundary between the neutral and sentiment-bearing classes, while direct positive-negative misclassification was rare (4.5%). The combined model achieved an accuracy of 82.86%, with a macro-averaged precision of 82.95%, recall of 83.56%, and F1-score of 82.79%. Interestingly, Chi-Square feature selection alone yielded the highest accuracy among the four scenarios (85.10%), suggesting that feature selection contributed more to performance gains than class balancing in this dataset. These findings suggest that combining feature selection and oversampling techniques improves the reliability of multi-platform sentiment classification for health-related topics and can inform more effective public health communication strategies regarding diabetes.

Article Details

How to Cite

Citation Format
Khoirun Nisa, A. D. M., Latifah, N., & Setiawan, R. R. (2026). Multi-Platform Sentiment Analysis of Diabetes Mellitus on X and TikTok Using K-Nearest Neighbor, Chi-Square Selection, and Oversampling. International Journal of Management Science and Information Technology, 6(2), 1714-1724. https://doi.org/10.35870/ijmsit.v6i2.8061

References

13 References
  • Aminuddin, A., Sima, Y., Izza, N. C., Lalla, N. S. N., & Arda, D. (2023). Edukasi Kesehatan Tentang Penyakit Diabetes Melitus bagi Masyarakat. Abdimas Polsaka, 7–12. https://doi.org/10.35816/abdimaspolsaka.v2i1.25
  • Asro'i, A., & Februariyanti, H. (2022). Analisis Sentimen Pengguna Twitter Terhadap Perpanjangan PPKM Menggunakan Metode K-Nearest Neighbor. Jurnal Khatulistiwa Informatika, 10(1), 17–24. https://doi.org/10.31294/jki.v10i1.12624
  • Bhuana, K., Indriati, & Muflikhah, L. (2022). Analisis Sentimen Masyarakat Indonesia tentang Vaksin Covid-19 di Twitter dengan menggunakan Metode K-Nearest Neighbors dan Seleksi Fitur Chi Square. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 6(3), 1395–1401.
  • Candra, C., Chandra, K. W., & Irsyad, H. (2024). Efektifitas SMOTE dalam Mengatasi Imbalanced Class Algoritma K-Nearest Neighbors pada Analisis Sentimen terhadap Starlink. Jurnal Ilmu Komputer dan Informatika, 4(1), 31–42. https://doi.org/10.54082/jiki.132
  • Landis, J. R., & Koch, G. G. (1977). The measurement of observer agreement for categorical data. Biometrics, 33(1), 159–174. https://doi.org/10.2307/2529310
  • Pramayasa, K., Maysanjaya, I. M. D., & Indradewi, I. G. A. A. D. (2023). Analisis Sentimen Program MBKM Pada Media Sosial Twitter Menggunakan KNN dan SMOTE. SINTECH (Science and Information Technology) Journal, 6(2), 89–98. https://doi.org/10.31598/sintechjournal.v6i2.1372
  • Qadri, M. (2020). Pengaruh Media Sosial Dalam Membangun Opini Publik. Qaumiyyah: Jurnal Hukum Tata Negara, 1(1), 49–63. https://doi.org/10.24239/qaumiyyah.v1i1.4
  • Setiawan, I., & Andriyani, W. (2026). Perbandingan Kinerja dan Efisiensi Model NLP pada Analisis Sentimen Ulasan Aplikasi Layanan Publik Digital. Jurnal Sistem Komputer dan Informatika (JSON), 7(4), 1505–1517. https://doi.org/10.30865/json.v7i4.9774
  • Shefia, F. A., Setiaji, P., & Triyanto, W. A. (2026). Analisis Sentimen Ulasan Aplikasi CapCut pada Google Play Store menggunakan Support Vector Machine dengan Teknik SMOTE. Sistemasi: Jurnal Sistem Informasi, 15, 658–668. https://doi.org/10.32520/stmsi.v15i2.5948
  • Ubaidillah, M., Fatah, D. A., & Negara, Y. D. P. (2025). Penerapan SMOTE dan Chi-Square Feature Selection untuk Meningkatkan Akurasi Model Multinomial Naïve Bayes dalam Analisis Sentimen Video "Presiden Prabowo Menjawab" di YouTube. Jurnal Nasional Komputasi dan Teknologi Informasi (JNKTI), 8(5). https://doi.org/10.32672/jnkti.v8i5.9807
  • Vidya Sakta, P., Indriati, & Marji. (2020). Analisis Sentimen Pariwisata di Kabupaten Malang dengan Menggunakan Metode BM25F, Neighbor Weighted K-Nearest Neighbor dan Seleksi Fitur Chi-Square. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 4(10), 3659–3666.
  • Wahyuni, S., Arisani, G., Riani, R., & Hanipah, H. (2022). Peran Media Sosial Sebagai Upaya Promosi Kesehatan. Jurnal Forum Kesehatan: Media Publikasi Kesehatan Ilmiah, 11(2), 86–96. https://doi.org/10.52263/jfk.v11i2.233
  • Wijaya, R., & Suwandhi, A. (2024). Sentimen Komentar Universitas Pelita Harapan Pada TikTok Menggunakan Metode K-Nearest Neighbor. JDMIS: Journal of Data Mining and Information Systems, 2(1), 26–36. https://doi.org/10.54259/jdmis.v2i1.2418

Author Biographies

Asti Devi Mutiara Khoirun Nisa, Muria Kudus University

Information Systems Study Program, Faculty of Engineering, Universitas Muria Kudus, Kudus Regency, Central Java, Indonesia

Noor Latifah, Muria Kudus University

Information Systems Study Program, Faculty of Engineering, Universitas Muria Kudus, Kudus Regency, Central Java, Indonesia

R. Rhoedy Setiawan, Muria Kudus University

Information Systems Study Program, Faculty of Engineering, Universitas Muria Kudus, Kudus Regency, Central Java, Indonesia

Downloads

OJS UsageStats Plugin
Download data is not yet available.

Most read articles by the same author(s)

Contrimetric

Recommended Articles

Journal Transparency

Additional Information

Learn more about how this journal ensures quality, ethics, and transparency.