Brilliance: Research of Artificial Intelligence
Vol. 5 No. 1 (2025): Brilliance: Research of Artificial Intelligence, Article Research May 2025

Sentiment Analysis of Mental Health Using Support Vector Machine (SVM) with FastAPI Implementation

Maulyanda, Maulyanda (Unknown)
Sri Azizah Nazhifah (Unknown)



Article Info

Publish Date
24 Jul 2025

Abstract

Mental health is a vital aspect that contributes significantly to an individual’s productivity, daily activity, and overall quality of life. With the increasing prevalence of mental health issues, early detection and analysis are essential. This study aims to identify mental health conditions using a machine learning approach, specifically the Support Vector Machine (SVM) algorithm. The dataset used consists of 53,043 text-based statements that are classified into seven distinct categories of mental conditions: normal, depression, suicide, anxiety, bipolar, stress, and personality disorders. The preprocessing steps applied to the dataset include text cleaning, tokenization, stopword removal, and lemmatization to standardize the textual input. Following this, 80% of the data is allocated for training the model, while the remaining 20% is reserved for testing purposes. The SVM algorithm is utilized to build a predictive model capable of classifying mental conditions based on text input. Furthermore, this model is deployed through an application interface using the FastAPI framework, enabling integration with digital platforms. The results indicate that the model achieves an accuracy of 79%, a recall of 77%, and an F1-score of 73%. These findings suggest that SVM is a capable and efficient method for analyzing and detecting various mental health conditions. This approach supports early intervention and offers practical implications for digital mental health screening tools.

Copyrights © 2025






Journal Info

Abbrev

brilliance

Publisher

Subject

Decision Sciences, Operations Research & Management Mathematics Other

Description

Brilliance: Research of Artificial Intelligence is The Scientific Journal. Brilliance is published twice in one year, namely in February, May and November. Brilliance aims to promote research in the field of Informatics Engineering which focuses on publishing quality papers about the latest ...