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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine Learning Approaches to Sentiment Analysis of Mental Health Discussions on Platform X

Umniy Salamah, Bagus Priambodo, Riri Fajriah, Yuwan Jumaryadi et al.
PIKSEL Penelitian Ilmu Komputer Sistem Embedded and Logic
Mental Health via Writing
article

Machine Learning Approaches to Sentiment Analysis of Mental Health Discussions on Platform X

Umniy Salamah, Bagus Priambodo, Riri Fajriah, Yuwan Jumaryadi, Arie Lystha
article en

Abstract

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.

PIKSEL Penelitian Ilmu Komputer Sistem Embedded and LogicVol. 13(2)
Mercu Buana University (ID), Keihin (Japan) (JP)
Universitas Mercu Buana
Openalex Percentile: Top 68%
Mental Health via Writing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.