University Student Stress Detection Based on X Social Media Comments Using TF-IDF and Logistic Regression
DOI:
https://doi.org/10.33633/joins.v11i1.14836Keywords:
Stress, University Students, Social Media X, Logistic Regression, TF-IDFAbstract
Mental health issues, particularly stress among university students, are on the rise and require special attention. Students tend to express their psychological conditions implicitly through comments or posts on social media, especially on platform X, which provides valuable digital data for real-time and non-invasive emotional analysis. This study aims to develop a stress detection system for students by analyzing comments on social media platform X using the Term Frequency-Inverse Document Frequency (TF-IDF) method and the Logistic Regression algorithm. TF-IDF is applied to extract important linguistic features from student comments, while Logistic Regression is chosen for its ability to provide clear probabilistic interpretation and efficiency in processing high-dimensional text data. The model is trained using labeled student comment data and evaluated using accuracy, F1-score, precision, and recall metrics. The results indicate that the system developed can classify stress and non-stress comments with a high accuracy of 93%, demonstrating great potential in supporting early interventions for student mental health. The implication of this research is expected to serve as a foundation for the development of digital applications that are responsive, adaptive, and practical in promoting student mental well-being in Indonesia.References
D. Kusuma Ningrum and A. Maytsa Ismawardi, “Efektivitas Algoritma Kecerdasan Buatan dalam Implementasi Kesehatan Mental : Systematic Literature Review,” Jurnal Mahasiswa Teknik Informatika), vol. 9, no. 1, 2025.
D. Perhatian, “Analisis Sentimen dan Perilaku Pengguna Media Sosial terhadap Isu Kesehatan Mental menggunakan Metode Natural Language Processing (NLP),” Jurnal Pengabdian Masyarakat (Kesehatan), vol. 6, no. 2, pp. 153–158, Oct. 2024.
O. Solihin, D. Firmansyah, A. Z. Abdullah, and A. P. Dhahiyat, “Pemanfaatan AI dalam Analisis Isi Digital : Studi Kasus Komentar Media Sosial,” Jurnal Pendidikan Dan Ilmu Sosial (JUPENDIS), vol. 3, no. 2, pp. 117–129, Mar. 2025, doi: 10.54066/jupendis.v3i2.3141.
S. Inamdar, R. Chapekar, S. Gite, and B. Pradhan, “Machine Learning Driven Mental Stress Detection on Reddit Posts Using Natural Language Processing,” Human-Centric Intelligent Systems, vol. 3, no. 2, pp. 80–91, Mar. 2023, doi: 10.1007/s44230-023-00020-8.
N. Oryngozha, P. Shamoi, and A. Igali, “Detection and Analysis of Stress-Related Posts in Reddit’s Acamedic Communities,” IEEE Access, vol. 12, pp. 14932–14948, 2024, doi: 10.1109/ACCESS.2024.3357662.
A. Syahidin, M. Alwi, Subandi, and M. Hariyadi, “Analisis Sentimen Data Twitter terhadap Pelaksanaan Pembelajaran Online di Indonesia pada Masa Pandemi Covid-19 menggunakan Metode Natural Language Processing,” JURSISTEKNI (Jurnal Sistem Informasi dan Teknologi Informasi), vol. 5, pp. 319–331, Sep. 2023.
O. N. Julianti, N. Suarna, and W. Prihartono, “Penerapan Natural Language Processing pada Analisis Sentimen Judi Online di Media Sosial Twitter,” Jurnal Mahasiswa Teknik Informatika, vol. 8, no. 3, pp. 2936–2942, Jun. 2024.
Y. Suharsono and Z. Anwar, “Analisis Stres dan Penyesuaian Diri pada Mahasiswa,” Jurnal Online Psikologi, vol. 8, no. 1, pp. 1–12, 2020.
S. Aisyiyah and W. Maharani, “Analisis Berbasis Emosional pada Depresi di Media Sosial menggunakan Pendekatan Convolutional Neural Network,” e-Proceeding of Engineering, vol. 10, no. 2, pp. 1637–1645, Apr. 2023.
K. Kumari and S. Das, “Stress Detection System using Natural Language Processing and Machine Learning Techniques,” 2022. [Online]. Available: https://iiitranchi.ac.in/
S. Mutmainah, “Kemungkinan Depresi dari Postingan pada Sosial Media,” Jurnal Sains, Nalar, dan Aplikasi Teknologi Informasi, vol. 1, no. 2, Mar. 2022, doi: 10.20885/snati.v1i2.11.
D. Panca Wilie, “Analisis Sentimen Opini Publik terhadap Chatgpt di Twitter menggunakan Metode Naive Bayes,” Jurnal Nasional Ilmu Komputer, vol. 4, no. 4, pp. 2746–1343, Nov. 2023, [Online]. Available: https://www.kaggle.com/datasets/charunisa/ChatGPT-sentiment-analysis.
A. P. Sari, D. A. Prasetya, F. P. Aditiawan, and M. M. Al Haromainy, “Prediksi Gangguan Kesehatan Mental pada Kalangan Mahasiswa menggunakan Metode Pseudo-Labeling dan Algoritma Regresi Logistik,” TAMIKA: Jurnal Tugas Akhir Manajemen Informatika & Komputerisasi Akuntansi, vol. 4, no. 2, Dec. 2024, doi: 10.46880/tamika.Vol4No2(SEMNASTIK).pp40-48.
A. Afifah Adnan Hakim and R. Adi Saputra, “Deteksi Dini Gejala Stres pada Mahasiswa Berdasarkan Faktor-Faktor Penyebabnya menggunakan Metode Logistic Regression,” IJAI (Indonesian Journal of Applied Informatics, vol. 8, no. 2, pp. 2598–5981, 2024.
P. Geliche Mahesh Babu and P. Gururama Senthilvel, “Predicting Student Stress Levels and Mental Health Using Convolutional Neural Network Algorithm in Comparison with Logistic Regression,” Hybrid and Advanced Technologies, pp. 237–241, 2025, doi: 10.1201/9781003559115-40.
Y. Tolla and Kusrini, “Deteksi Stres dan Depresi Unggahan Media Sosial dengan Machine Learning,” vol. 15, no. https://ejurnal.umri.ac.id/index.php/JIK/issue/view/304, pp. 84–92, Apr. 2025.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 JOINS (Journal of Information System)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).

This work is licensed under a Creative Commons Attribution 4.0 International License.


















