Mini Project
Mini Project
Mrs.P. Dhanavanthini,
Assistant Professor
CERTIFICATE
This is to certify that the Mini Project-I Report entitled “Transforming Mental
Healthcare: Deep Learning for Accurate Diagnosis and Personalized Treatment
Recommendation” being submitted by
Saikiran Pogiri 218W1A0546
Prudhvi Katarapu 218W1A0525
Dhavan Kare 218W1A0524
in partial fulfilment for the award of the Degree of Bachelor of Technology in Computer
Science and Engineering to the Jawaharlal Nehru Technological University, Kakinada, is a
record of bonafide work carried out during the period from 2023 - 2024.
i
DECLARATION
We hereby declare that the Mini Project-I entitled “Transforming Mental Healthcare:
Deep Learning for Accurate Diagnosis and Personalized Treatment Recommen-
dation ” submitted for the B.Tech Degree is our original work and the dissertation has not
formed the basis for the award of any degree, associateship, fellowship or any other similar
titles.
ii
ACKNOWLEDGEMENT
We have been bestowed with the privilege of thanking Dr. D. Rajeswara Rao, Pro-
fessor and Head of the Department for his moral and material support.
We would like to express our deep gratitude to our guide Mrs.P.Dhanavanthini, As-
sistant Professor for her persisting encouragement, everlasting patience and keen interest in
discussion and for her numerous suggestions which we had at every phase of this project.
We owe our acknowledgements to an equally long list of people who helped us in Mini
Project-I work.
iii
Table of Contents
1 INTRODUCTION 1
1.1 Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Deep Mental Disorder Diagnosis Challenges . . . . . . . . . . . . . . 1
1.1.2 Deep Learning Methodologies . . . . . . . . . . . . . . . . . . . . . . 1
1.1.3 Integration of Deep Learning Techniques: . . . . . . . . . . . . . . . . 2
1.1.4 Web-Based Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.5 Long Short-Term Memory . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.6 Convolutional Neural Network . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 LITERATURE REVIEW 6
2.1 A Review of Machine Learning and Deep Learning Approaches on Mental
Health Diagnosis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Road accident risk prediction using generalized regression neural network op-
timized with self-organizing map . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 A hybrid model for depression detection using deep learning . . . . . . . . . 7
2.4 Electroencephalography-Based Depression Detection Using Multiple Machine
Learning Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 Depression Detection in Speech Using Transformer and Parallel Convolutional
Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 Mental Health Prediction Using Machine Learning . . . . . . . . . . . . . . . 9
2.7 Depression Detection From Social Networks Data Based on Machine Learning
and Deep Learning Techniques: An Interrogative Survey . . . . . . . . . . . 10
4 SOFTWARE DESIGN 13
iv
4.1 Software Development Lifecycle: . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.1 Use-Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.2 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2.3 Sequence diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5 PROPOSED SYSTEM 17
5.1 Proposed Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Dataset Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Building Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3.1 CNN (Convolutional Neural Network): . . . . . . . . . . . . . . . . . 18
5.3.2 BERT (Bidirectional Encoder Representations from Transformers): . 18
5.3.3 LSTM (Long Short-Term Memory): . . . . . . . . . . . . . . . . . . . 18
REFERENCES 24
v
List of Figures
vi
Abstract
Accurate diagnosis and effective treatment recommendation for mental disorders pose sig-
nificant challenges in healthcare[3]. Despite advancements, human accuracy in diagnosis
remains low, and traditional machine learning (ML) approaches on medical claims data for
depression screening still report suboptimal accuracy metrics. In this study, we investigate
the potential of deep learning methodologies to address these challenges. Our approach
involves training a multi-layer neural network on raw medical data, enabling it to uncover
hidden patterns without explicit feature selection. By integrating Convolutional Neural Net-
works (CNN), Bidirectional Encoder Representations from Transformers (BERT), and Long
Short-Term Memory (LSTM) networks using bagging techniques, we develop a web based
platform for accurately detecting mental disorders. Users provide input to the platform,
which enhances diagnosis accuracy and treatment recommendation. This research aims to
significantly improve the accuracy in the predicting the mental disorder by providing precise
and personalized mental disorder diagnosis and treatment recommendations. The integra-
tion of deep learning techniques offers a promising avenue for enhancing the efficiency and
accuracy of mental health diagnosis and treatment recommendation, thus addressing critical
gaps in current healthcare practices
vii
Chapter 1
INTRODUCTION
1
1.1.3 Integration of Deep Learning Techniques:
The model integrates multiple deep learning techniques using bagging techniques. This inte-
gration enhances the model’s ability to extract intricate patterns and insights from medical
data, leading to improved diagnostic accuracy.
2
Figure 1.1: LSTM architecture
1.2 Motivation
The motivation behind developing a deep learning-based model for accurately diagnosing and
recommending treatment for mental disorders stems from the persistent challenges faced in
healthcare. Despite advancements, traditional methods for diagnosing mental disorders still
exhibit low accuracy, and existing machine learning approaches often fall short in effectively
leveraging medical data for accurate screening. By harnessing the power of deep learn-
ing methodologies such as Convolutional Neural Networks (CNNs), Bidirectional Encoder
Representations from Transformers (BERT), and Long Short-Term Memory (LSTM) net-
works, this study seeks to revolutionize mental health diagnosis. These advanced techniques
enable the model to extract intricate patterns and insights directly from raw medical data,
eliminating the need for explicit feature selection and thereby enhancing diagnostic accuracy.
Through the integration of these deep learning techniques and employing bagging techniques
3
to combine their strengths, the developed web-based platform offers a groundbreaking solu-
tion for precise and personalized mental disorder diagnosis and treatment recommendations.
By addressing critical gaps in current healthcare practices, this research endeavors to sig-
nificantly improve the efficiency and accuracy of mental health diagnosis and treatment,
ultimately aiming to improve the overall well-being of individuals worldwide.
1.4 Scope
1. The Scope is limited to developing a website which can run the developed model at
the backend to accurately predict the mental disorder.
1.5 Objectives
The Objectives of our project are:
1. To develop a deep learning model for accurate diagnosis of mental disorders using
medical claims data.
2. To create a website which runs the developed model on the backend to accurately
predict the mental disorder.
4
1.6 Advantages
1. Enhanced Accuracy: Deep learning techniques improve diagnostic accuracy compared
to traditional methods and machine learning approaches.
5
Chapter 2
LITERATURE REVIEW
Methodology:
N. K., Kim et.al[1] described various algorithms, including Logistic Regression, Support Vec-
tor Machine, Random Forest, Catboost, Hierarchical Attention Network, Convolutional Neu-
ral Networks, Super Learning Algorithm, Ada Boost, Extreme Learning Machine, Decision
Tree, and Gradient Boosting Trees, to predict mental health disorders such as schizophrenia,
depression, anxiety, bipolar disorder, post-traumatic stress disorder, anorexia nervosa, and
attention deficit hyperactivity disorder, aiming to enhance diagnostic accuracy and under-
standing across a range of psychiatric conditions.
Advantages:
1. This model can process large amounts of data quickly, enabling faster diagnosis and
treatment planning.
2. only a limited number of mental health conditions were included in the analysis.
6
Dataset:
The dataset used in the paper comprises medical claims data from approximately 812,853
individuals collected between 2018 and 2022 in Estonia.
Methodology:
Bertl et.al[2] utilized logistic regression, support vector machine, random forest, hierarchical
attention network, and convolutional neural network for predicting mental health disorders
including schizophrenia, depression, anxiety, bipolar disorder, post-traumatic stress disorder,
anorexia nervosa, and attention deficit hyperactivity disorder.
Advantages:
1. use of self-attention mechanisms provides valuable insights into disease patterns and
correlations, helping medical professionals better understand the model’s predictions
and improving trust in its accuracy.
2. The proposed model has practical applications, such as screening patients for depres-
sion in general practitioner settings
Disadvantages:
1. It’s limited to medical claims data from Estonia implement and maintain, making it
challenging to replicate and apply in other settings.
Methodology:
Marriwala et al[3] The methodology in Vandana, Nikhil Marriwala, Deepti Chaudhary (2022)
involves the use of CNN and LSTM algorithms for depression detection, utilizing audio and
text features extracted from responses of depressed patients and the DAIC-WOZ database.
Google Collab is used as the platform for depression detection. Proposed Model is based on
7
two algorithms i.e., one is CNN and second is LSTM. CNN or Convolution neural network or
ConvNet is a deep learning algorithm which takes input as an image, assigns some weights
to input values and then helps in classification of output image.
Advantages:
Disadvantage:
1. Identification of depressed patients on social media platforms like Twitter and Reddit
Dataset: Naturalistic driving data of the Ipswich Connected Vehicle Pilot (ICVP) project,
Queensland.
Methodology:
Ksibi et al[4] Multiple algorithms for detecting depression using EEG signals, including CNN
models with different numbers of layers, a parallel linear CNN, and a CNN model for char-
acterizing EEG signals. The study also mentions the use of deep learning techniques and
other methods for investigating mental diseases.
Advantages:
Disadvantages:
8
2.5 Depression Detection in Speech Using Transformer
and Parallel Convolutional Neural Networks
Journal: MDPI,2024
Methodology:
Yin et al[5] involved in proposing a deep learning model with a parallel-CNN and transformer,
conducting experiments on two datasets, using a Hanning window for speech framing, and
employing the Adam optimizer with specific settings.
Advantages:
1. Complex relations among various road accident causes can be easily analyzed using
the BBN model.
2. The BBN model can accurately predict the likelihood of road accidents based on avail-
able data, helping policymakers develop effective road safety plans.
Disadvantages:
1. Parallel Processing
Dataset:The dataset used in the study is collected through a survey form distributed to
individuals of varied demographics to understand their mental health problems in detail.
Methodology:
Chung et al[6] Methodology involves algorithms such as Decision tree, Support Vector Ma-
chine (SVM), Random Forest, Convolutional Neural Network
Advantages:
9
Disadvantages:
Methodology:
Upama et al[7] The methodology involves various algorithms such as Decision tree (DT) ,Sup-
port vector machine (SVM) , K-nearest neighbor (KNN) ,Ensemble ,Convolutional Neural
Network (CNN) -,Recurrent Neural Network (RNN).
Advantages:
1. No novelty in dataset.
Disadvantages:
10
Chapter 3
SOFTWARE REQUIREMENTS ANALYSIS
1. Data Collection: Road accidents data is collected from the Vijaywada Police depart-
ment in the regions of Patamata, Penamaluru, Mylavaram, Krishnalanka, Ibrahimpat-
nam, and Gandhinagar.
2. Data Preprocessing: The system should have the ability to handle data preprocess-
ing tasks such as data cleaning, normalization, and feature selection for the classifica-
tion of road accident severity.
3. Training Deep Learning Models: The system should have the capability to train
deep learning models, such as BERT, CNN, LSTM, to accurately predict the mental
disorder.
4. Model Evaluation: The system should be able to evaluate the performance of the
deep learning models using appropriate evaluation metrics such as accuracy, precision,
recall, and F1-score.
1. Usability: Focuses on designing software that is easy to use, intuitive, and meets the
needs of the end-users, providing a positive and efficient user experience.
11
2. Security: Ensures that software systems are protected against unauthorized access,
data breaches, and other potential security risks, safeguarding sensitive information
and maintaining user trust.
3. Reliability: Aims to deliver software that performs consistently and reliably, minimiz-
ing errors, crashes, and system failures, thereby ensuring the availability and stability
of the application.
5. Availability: Refers to the ability of software to remain accessible and operational for
users, minimizing downtime and disruptions, and ensuring that the system is available
whenever it is needed.
6. Scalability: Deals with the software’s ability to handle increasing workloads, adapt to
growing user demands, and efficiently utilize resources as the system expands, allowing
for future growth and capacity.
12
Chapter 4
SOFTWARE DESIGN
13
Figure 4.2: UseCase Diagram
several key use cases: ”Input Medical Information,” allowing users to input symptoms, med-
ical history, and demographic details into the platform; ”Request Diagnosis,” enabling users
to request a mental health diagnosis based on the provided information; ”Receive Diagnosis,”
indicating the system’s capability to generate and present an accurate diagnosis of mental
disorders; ”Receive Treatment Recommendations,” allowing users to receive personalized
treatment recommendations based on the diagnosed mental disorder and other relevant fac-
tors; and ”Provide Feedback,” offering users the option to provide feedback on the accuracy
and relevance of the diagnosis and treatment recommendations. These use cases form a
sequential flow, where users input their medical information, request a diagnosis, receive the
diagnosis, and then receive personalized treatment recommendations, thereby facilitating a
comprehensive and user-centric approach to mental health diagnosis and treatment.
14
4.2.2 Activity Diagram
The activity diagram illustrates the sequential flow within the mental health model, starting
from user input of medical information to receiving personalized treatment recommendations.
Users input symptoms and history, which the system then analyzes using deep learning
techniques like CNN, BERT, and LSTM networks. After preprocessing and model training,
the system generates an accurate diagnosis and personalized treatment suggestions based
on factors like symptom severity and patient preferences. Throughout, security measures
safeguard sensitive data, and user feedback allows for continuous improvement. This user-
centric approach underscores the model’s effectiveness in accurate diagnosis and tailored
treatment recommendations.
15
4.2.3 Sequence diagram
The sequence diagram for the mental health model delineates the chronological flow of inter-
actions between the user and the system, detailing the steps from inputting medical infor-
mation to receiving personalized treatment recommendations. Initially, the user initiates the
process by providing their medical data, including symptoms and history. Upon receiving
this input, the system engages in a series of actions, starting with data preprocessing to pre-
pare the information for analysis. Next, deep learning methodologies like CNN, BERT, and
LSTM networks are applied to uncover patterns and correlations within the data. Following
analysis, the system generates a diagnosis based on the input, presenting the user with an
accurate assessment of their mental health condition. Subsequently, personalized treatment
recommendations are provided, taking into account factors such as symptom severity and
treatment efficacy. Throughout this process, security measures ensure the confidentiality of
sensitive medical information. Additionally, user feedback mechanisms allow for continuous
refinement of the system’s accuracy and relevance. Overall, the sequence diagram illustrates
the systematic progression of interactions, highlighting the model’s user-centric approach
and the utilization of advanced deep learning techniques for effective diagnosis and treat-
ment recommendation in mental health care.
16
Chapter 5
PROPOSED SYSTEM
17
5.2 Dataset Collection
The name of the dataset is DIAC-WOZ Dataset.This database contains clinical interviews
designed to support the diagnosis of psychological distress conditions such as anxiety, de-
pression, and post-traumatic stress disorder. These interviews were collected as part of a
larger effort to create a computer agent that interviews people and identifies verbal and
nonverbal indicators of mental illness (DeVault et al., 2014). Data collected include audio
and video recordings and extensive questionnaire responses; this part of the corpus includes
data from the Wizard-of-Oz interviews, conducted by an animated virtual interviewer called
Ellie, controlled by a human interviewer in another room.Includes 189 sessions of interactions
ranging between 7-33 minutes (average is 16 minutes).Each session includes transcripts of
the interaction, participant audio files, and information about facial features.
18
Chapter 6
RESULTS AND ANALYSIS
19
Figure 6.2: Treatment Accuracy
The context shows a list of performance metrics for various methods, including Boosting,
Random Forest, Decision Tree Classifier, K-Neighbors, Log. Regression, and Bagging. It
appears that our model, using bagging techniques, has achieved an accuracy of 82.28%,
outperforming other methods in this particular dataset.
20
Figure 6.4: Treatment Index
21
Figure 6.6: Giving Input
22
Chapter 7
CONCLUSION AND FUTURE WORK
The mental health model presented in this study showcases a promising approach to lever-
aging deep learning methodologies for accurate diagnosis and personalized treatment recom-
mendations. By integrating advanced techniques such as CNN, BERT, and LSTM networks,
the model demonstrates its capability to uncover hidden patterns and correlations within
medical data, leading to precise assessments of mental health conditions. The user-centric
design emphasizes the importance of tailoring recommendations to individual needs, consid-
ering factors like symptom severity and treatment efficacy. The inclusion of security measures
ensures the confidentiality of sensitive medical information, fostering trust and compliance
with privacy regulations. Overall, the model holds significant potential to improve the ef-
ficiency and accuracy of mental health care, addressing critical gaps in current healthcare
practices
Moving forward, several avenues for future work can enhance and extend the capabilities of
the mental health model. Firstly, continued research and development efforts can focus on
refining the deep learning algorithms used within the model, exploring novel architectures
and optimization techniques to improve diagnostic accuracy and efficiency further. Addi-
tionally, expanding the scope of the model to encompass a broader range of mental health
disorders and associated treatments can enhance its applicability and utility in clinical set-
tings. Furthermore, incorporating real-time data streams and wearable technology into the
model’s input process can enable continuous monitoring of patients’ mental health status,
facilitating proactive intervention and support. Lastly, collaboration with healthcare profes-
sionals and stakeholders can facilitate the integration of the model into existing healthcare
systems, ensuring seamless adoption and widespread impact on patient care. Overall, ongo-
ing innovation and collaboration are key to realizing the full potential of the mental health
model and advancing mental health care practices.
23
REFERENCES
[1] . N. K., Kim, S. H., Jhon, M., Yang, H. J., Pant, S. (2023, January). A Review
of Machine Learning and Deep Learning Approaches on Mental Health Diagnosis. In
Healthcare (Vol. 11, No. 3, p. 285). MDPI.
[2] Bertl, M., Bignoumba, N., Ross, P., Yahia, S. B., Draheim, D. (2024). Evaluation of
deep learning-based depression detection using medical claims data. Artificial Intelli-
gence in Medicine, 147, 102745.
[3] Marriwala, N., Chaudhary, D. (2023). A hybrid model for depression detection using
deep learning. Measurement: Sensors, 25, 100587.
[4] .Ksibi, A., Zakariah, M., Menzli, L. J., Saidani, O., Almuqren, L., Hanafieh, R. A.
M. (2023). Electroencephalography-based depression detection using multiple machine
learning techniques. Diagnostics, 13(10), 1779.
[5] Yin, F., Du, J., Xu, X., Zhao, L. (2023). Depression detection in speech using
transformer and parallel convolutional neural networks. Electronics, 12(2), 328.
[6] Chung, J., Teo, J. (2022). Mental health prediction using machine learning: taxonomy,
applications, and challenges. Applied Computational Intelligence and Soft Computing,
2022, 1-19.
[7] Upama, P. B., Valero, M., Shahriar, H., Syam, M., Ahamed, S. I. (2023, June). Mental
Health Analysis During Pandemic: A Survey of Detection and Treatment. In 2023
IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC)
(pp. 1530-1538). IEEE.
[8] Hasib, K. M., Islam, M. R., Sakib, S., Akbar, M. A., Razzak, I., Alam, M. S. (2023).
Depression detection from social networks data based on machine learning and deep
learning techniques: An interrogative survey. IEEE Transactions on Computational
Social Systems.
24