Machine Learning Approaches to Sentiment Analysis of Mental Health Discussions on Platform X
Sentiment analysis on mental health issues is crucial for understanding public perceptions of healthcare services. This study analyzed tweets related to mental health on platform X in 2025 using SVM, Random Forest, and Naive Bayes algorithms. Data was collected through web scraping with Python, then evaluated using a confusion matrix with accuracy, precision, f1-score, and recall metrics. The classification results showed a distribution of sentiment: positive (3,667 tweets), neutral (838 tweets), and negative (704 tweets). A comparative analysis of the three algorithms revealed that SVM achieved the highest accuracy (78.69%), followed by Random Forest (75.04%) and Naive Bayes (70.44%), proving the superiority of SVM in classifying mental health sentiment. These findings provide valuable insights for stakeholders in improving mental healthcare services based on public feedback, while also offering a reference for effective sentiment analysis methods for social media data.
Authors
- Umniy Salamah
- Bagus Priambodo (ORCID: https://orcid.org/0000-0002-9459-0405)
- Riri Fajriah
- Yuwan Jumaryadi (ORCID: https://orcid.org/0000-0002-5757-6321)
- Arie Lystha
Institutions
- Mercu Buana University (ID)
- Keihin (Japan) (JP)
Publication Details
- Journal
- PIKSEL Penelitian Ilmu Komputer Sistem Embedded and Logic
- Published
- 2025-09-30
- DOI
- https://doi.org/10.33558/piksel.v13i2.11350
- Primary Topic
- Mental Health via Writing
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Universitas Mercu Buana