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

Title:
Sentiment Analysis of Mental Health Using Support Vector Machine (SVM) with FastAPI Implementation
Source:
Brilliance: Research of Artificial Intelligence. 5:568-575
Publisher Information:
Information Technology and Science (ITScience), 2025.
Publication Year:
2025
Document Type:
Fachzeitschrift Article
ISSN:
2807-9035
DOI:
10.47709/brilliance.v5i1.6580
Rights:
CC BY NC
Accession Number:
edsair.doi...........630566bda2dc84808f605dbf70228f56
Database:
OpenAIRE

Weitere Informationen

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.