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

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.

Authors

Institutions

Publication Details

Journal
Brilliance Research of Artificial Intelligence
Published
2025-07-24
DOI
https://doi.org/10.47709/brilliance.v5i1.6580
Citations
1
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Sri Azizah Nazhifah, Maulyanda Maulyanda
1 citations
Brilliance Research of Artificial Intelligence
Sentiment Analysis and Opinion Mining
2.48
article

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

Sri Azizah Nazhifah, Maulyanda Maulyanda
article en
1 citations

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.

Brilliance Research of Artificial IntelligenceVol. 5(1)
Universitas Syiah Kuala (ID)
Openalex Percentile: Top 9%
Sentiment Analysis and Opinion Mining
2.48
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.

Sentiment Analysis of Mental Health Using Support Vector Machine (SVM) with FastAPI Implementation — Sri Azizah Nazhifah, Maulyanda Maulyanda · Brilliance Research of Artificial Intelligence (2025) | TGRS Research Map | TGRS