Emotional Health Monitoring System
Emotional Health Monitoring System
ABSTRACT
Mental health issues, such as anxiety, depression, and other psychological disturbances, have
become a significant public health concern globally. Identifying individuals at risk of these
conditions early on can lead to timely interventions and improved outcomes. With the rise of
technology and the increasing use of smartphones and wearable devices, there is an
opportunity to develop an innovative system that can monitor emotional health in real-time,
helping to detect potential psychological disturbances before they escalate. Traditionally,
mental health assessments relied on self-reporting and periodic check-ins with mental health
professionals. These approaches often had limitations, as individuals may not always
accurately report their emotional state, and there could be significant delays between
assessments. Additionally, access to mental health services was not always readily available,
leading to potential delays in diagnosis and treatment. Therefore, the need for an innovative
system for monitoring emotional health arises from the desire to overcome the limitations of
traditional approaches. By leveraging technology, such as machine learning, natural language
processing, we can create a continuous and unobtrusive monitoring system. Such a system
could gather real-time data on an individual's emotional state, behavior, and physiological
responses. Early detection of emotional disturbances can lead to timely intervention and
support, improving the overall mental well-being of individuals and reducing the burden on
mental health services. This innovative monitoring system has the potential to significantly
improve mental health outcomes on a broader scale. It offers a proactive approach to
emotional well-being, empowering individuals to take control of their mental health and
providing an invaluable tool for mental health professionals in identifying and supporting
those at risk of psychological disturbances.
CHAPTER 1
INTRODUCTION
1.1 Overview
Mental illness is a health problem that undoubtedly impacts emotions, reasoning, and social
interaction of a person. These issues have shown that mental illness gives serious
consequences across societies and demands new strategies for prevention and intervention.
To accomplish these strategies, early detection of mental health is an essential procedure.
Medical predictive analytics will reform the healthcare field broadly as discussed by Miner et
al. [1]. Mental illness is usually diagnosed based on the individual self-report that requires
questionnaires designed for the detection of the specific patterns of feeling or social
interactions [2]. With proper care and treatment, many individuals will hopefully be able to
recover from mental illness or emotional disorder [3].
Machine learning is a technique that aims to construct systems that can improve
through experience by using advanced statistical and probabilistic techniques. It is believed to
be a significantly useful tool to help in predicting mental health. It is allowing many
researchers to acquire important information from the data, provide personalized experiences,
and develop automated intelligent systems [4]. The widely used algorithms in the field of
machine learning such as support vector machine, random forest, and artificial neural
networks have been utilized to forecast and categorize the future events [5].
Supervised learning in machine learning is the most widely applied approach in many
types of research, studies, and experiments, especially in predicting illness in the medical
field. In supervised learning, the terms, attributes, and values should be reflected in all data
instances [6]. More precisely, supervised learning is a classification technique using
structured training data [7]. Meanwhile, unsupervised learning does not need supervision to
predict. The main goal of unsupervised learning is handling data without supervision. It is
very limited for the researchers to apply unsupervised learning methods in the clinical field.
The World Health Organization (WHOTh reports the region-wise status of different
barriers in diagnosing mental health problems and encourages researchers to be equipped
with the scientific knowledge to address the issue of mental health [9]. Now, there are various
techniques to predict the state of mental health due to advancement of technology. Research
in the field of mental health has increased recently and contributed to the information and
publications about different features of mental health, which can be applied in a wide range
of problems [10]. Many steps are involved in diagnosing mental health problems, and it is not
a straightforward process that can be done quickly. Generally, the diagnosis will begin with a
specific interview that is filled with questions about symptoms, medical history, and physical
examination. Besides that, psychological tests and assessment tools are also available and are
used to diagnose a person for mental health problems. There are several types of research
carried out to investigate and examine the movements of the face to identify certain mental
disorders [11]. The increase of research in the mental health field has led to the rise of
information in the form of finding suitable solutions to reduce mental health problems.
However, the precise reasons for mental illnesses are still unclear and uncertain.
The problem addressed in this research is the development of an "Innovative System for
Monitoring Emotional Health to Identify Individuals at Risk of Psychological Disturbances"
through the implementation of a chatbot.
Emotional Health Monitoring: The system aims to monitor and assess the emotional
well-being of individuals. This involves understanding the emotions and sentiments
expressed in their text-based input.
Identification of Risk: The system's primary objective is to identify individuals who
may be at risk of psychological disturbances based on their interactions with the
chatbot. This identification is crucial for early intervention and support.
Chatbot Functionality: The system includes a chatbot interface that engages in
conversations with users. Users can input text messages, and the chatbot responds
based on the content and sentiment analysis of these messages.
1.3 Significance
The significance of this system lies in its potential to address several important aspects of
mental health and support:
Finally, the proposed system has the potential to make a positive impact on mental health
support and early intervention by leveraging chatbot technology and sentiment analysis to
identify and assist individuals at risk of psychological disturbances.
CHAPTER 2
LITERATURE SURVEY
According to the paper by Greenstein et al., classification of childhood-onset schizophrenia
has been performed [12]. The data consist of genetic information, clinical information, and
brain magnetic resonance imaging. The authors use a random forest method to calculate the
probability of mental disorder. Random forest is being used in this paper because it has lower
error rates compared with other methods. The accuracy of 73.7% is obtained after the
classification.
In one of the research works conducted by Jo et al., they used network analysis and machine
learning approaches to identify 48 schizophrenia patients and 24 healthy controls [13]. The
network properties were rebuilt using the probabilistic brain tractography. After that, machine
learning is being applied to label schizophrenia patients and health controls. Based on the
result, the highest accuracy is achieved by the random forest model with an accuracy of
68.6% followed by the multinomial naive Bayes with an accuracy of 66.9%. Then, the
XGBoost accuracy score is 66.3% and the support vector machine shows an accuracy of
58.2%. Most of the machine learning algorithms show promising levels of performance in
predicting schizophrenia patients and healthy controls.
The support vector machine, which is a machine learning model, has been implemented to
classify schizophrenia patients [14]. The data set is obtained from the 20 schizophrenia
patients and 20 healthy controls. Then, the support vector machine algorithm is used for
classification with the help of functional magnetic resonance imaging and single nucleotide
polymorphism. After the classification, an accuracy of 0.82 is achieved with the functional
magnetic resonance imaging. For the single nucleotide polymorphism, an accuracy of 74% is
obtained.
Srinivasagopalan et al. [15] used a deep learning model to diagnose schizophrenia. The
National Institute of Health provides the data set for the experiments. The accuracy of each
machine learning algorithm is obtained and recorded. The results obtained from the
experiment show that deep learning showed the highest accuracy with 94.44%. The random
forest recorded an accuracy of 83.33% followed by logistic regression with an accuracy of
82.77%. Then, the support vector machine showed an accuracy of 82.68% in this experiment.
In another study conducted by Pla¨schke et al., the schizophrenia patients were distinguished
from the matched health controls based on the resting-state functional connectivity [16].
Resting-state functional connectivity could be used as a spot of functional dysregulation in
specific networks that are affected in schizophrenia. The authors have used support vector
machine classification and achieved 68% accuracy.
Pinaya et al. applied the deep belief network to interpret features from neuromorphometry
data that consist of 83 healthy controls and 143 schizophrenia patients [17]. The model can
achieve an accuracy of 73.6%; meanwhile, the support vector machine obtains an accuracy of
68.1%. The model can detect the massive difference between classes involving cerebrum
components. In 2018, Pinaya et al. proposed a practical approach to examine the brain-based
disorders that do not require a variety of cases [18]. The authors used a deep autoencoder and
can produce different values and patterns of neuroanatomical deviations.
A machine learning algorithm is developed to predict the clinical remission from a 12-week
course of citalopram [19]. Data are collected from the 1949 patients that experience
depression of level 1. A total of 25 variables from the data set are selected to make a better
prediction outcome. Then, the gradient boosting method is being deployed for the prediction
because of its characteristics that combine the weak predictive models when built. An
accuracy of 64.6% is obtained by using the gradient boosting method.
In order to identify depression and anxiety at an early age, a model has been proposed by
Ahmed et al. [20]. The model involves psychological testing, and machine learning
algorithms such as convolutional neural network, support vector machine, linear discriminant
analysis, and K-nearest neighbour have been used to classify the intensity level of the anxiety
and depression, which consists of two data sets. Based on the results obtained, the
convolutional neural network achieved the highest accuracy of 96% for anxiety and 96.8%
for depression. The support vector machine showed a great result and was able to obtain an
accuracy of 95% for anxiety and 95.8% for depression. Besides that, the linear discriminant
analysis reached the accuracy of 93% for anxiety and 87.9% for depression. Meanwhile, the
K-nearest neighbour obtained the lowest accuracy among the models with 70.96% for anxiety
and 81.82% for depression. Hence the convolutional neural network can be a helpful model
to assist psychologists and counsellors for making the treatments efficient.
CHAPTER 3
EXISTING TECHNIQUES
ML falls under the larger canvas of Artificial Intelligence. ML seeks to build intelligent
systems or machines that can automatically learn and train themselves through experience,
without being explicitly programmed or requiring any human intervention. In this sense, ML
is a continuously evolving activity. It aims to understand the data structure of the dataset at
hand and accommodate the data into ML models that can be used by companies and
organizations. Following are the benefits of ML.
3.1 DISADVANATGES
ML Model makes decisions based on what it has learnt from the data. As a result,
while ML models may learn from data, they may need some human interaction in the
early stages.
Moreover, its performance is poor with large dataset.
CHAPTER 4
PROPOSED METHODOLOGY
4.1 Overview
Data pre-processing is a process of preparing the raw data and making it suitable for a
machine learning model. It is the first and crucial step while creating a machine learning
model. When creating a machine learning project, it is not always a case that we come across
the clean and formatted data. And while doing any operation with data, it is mandatory to
clean it and put in a formatted way. So, for this, we use data pre-processing task. A real-world
data generally contains noises, missing values, and maybe in an unusable format which
cannot be directly used for machine learning models. Data pre-processing is required tasks
for cleaning the data and making it suitable for a machine learning model which also
increases the accuracy and efficiency of a machine learning model.
Importing Libraries: To perform data preprocessing using Python, we need to import some
predefined Python libraries. These libraries are used to perform some specific jobs. There are
three specific libraries that we will use for data preprocessing, which are:
Numpy: Numpy Python library is used for including any type of mathematical operation in
the code. It is the fundamental package for scientific calculation in Python. It also supports to
add large, multidimensional arrays and matrices. So, in Python, we can import it as:
import numpy as nm
Here we have used nm, which is a short name for Numpy, and it will be used in the whole
program.
Matplotlib: The second library is matplotlib, which is a Python 2D plotting library, and with
this library, we need to import a sub-library pyplot. This library is used to plot any type of
charts in Python for the code. It will be imported as below:
Pandas: The last library is the Pandas library, which is one of the most famous Python
libraries and used for importing and managing the datasets. It is an open-source data
manipulation and analysis library. Here, we have used pd as a short name for this library.
Consider the below image:
Handling Missing data: The next step of data preprocessing is to handle missing data in the
datasets. If our dataset contains some missing data, then it may create a huge problem for our
machine learning model. Hence it is necessary to handle missing values present in the dataset.
There are mainly two ways to handle missing data, which are:
By deleting the particular row: The first way is used to commonly deal with null
values. In this way, we just delete the specific row or column which consists of null
values. But this way is not so efficient and removing data may lead to loss of
information which will not give the accurate output.
By calculating the mean: In this way, we will calculate the mean of that column or
row which contains any missing value and will put it on the place of missing value.
This strategy is useful for the features which have numeric data such as age, salary,
year, etc.
Encoding Categorical data: Categorical data is data which has some categories such as, in
our dataset; there are two categorical variables, Country, and Purchased. Since machine
learning model completely works on mathematics and numbers, but if our dataset would have
a categorical variable, then it may create trouble while building the model. So, it is necessary
to encode these categorical variables into numbers.
Feature Scaling: Feature scaling is the final step of data preprocessing in machine learning.
It is a technique to standardize the independent variables of the dataset in a specific range. In
feature scaling, we put our variables in the same range and in the same scale so that no
variable dominates the other variable. A machine learning model is based on Euclidean
distance, and if we do not scale the variable, then it will cause some issue in our machine
learning model. Euclidean distance is given as:
If we compute any two values from age and salary, then salary values will dominate the age
values, and it will produce an incorrect result. So, to remove this issue, we need to perform
feature scaling for machine learning.
In machine learning data preprocessing, we divide our dataset into a training set and test set.
This is one of the crucial steps of data preprocessing as by doing this, we can enhance the
performance of our machine learning model. Suppose if we have given training to our
machine learning model by a dataset and we test it by a completely different dataset. Then, it
will create difficulties for our model to understand the correlations between the models. If we
train our model very well and its training accuracy is also very high, but we provide a new
dataset to it, then it will decrease the performance. So we always try to make a machine
learning model which performs well with the training set and also with the test dataset. Here,
we can define these datasets as:
Training Set: A subset of dataset to train the machine learning model, and we already know
the output.
Test set: A subset of dataset to test the machine learning model, and by using the test set,
model predicts the output.
For splitting the dataset, we will use the below lines of code:
Explanation
In the above code, the first line is used for splitting arrays of the dataset into random
train and test subsets.
In the second line, we have used four variables for our output that are
The last parameter random_state is used to set a seed for a random generator so that
you always get the same result, and the most used value for this is 42.
TF = (Number of times the word appears in the document) / (Total number of words
in the document)
IDF (Inverse Document Frequency), on the other hand, measures the importance of a
word within the corpus as a whole. It is calculated as:
IDF = log((Total number of documents in the corpus) / (Number of documents
containing the word))
The tf-idf value increases in proportion to the number of times a word appears in the
document but is often offset by the frequency of the word in the corpus, which helps to adjust
with respect to the fact that some words appear more frequently in general. TF-IDF use two
statistical methods, first is Term Frequency and the other is Inverse Document Frequency.
Term frequency refers to the total number of times a given term t appears in the document
doc against (per) the total number of all words in the document and The inverse document
frequency measure of how much information the word provides. It measures the weight of a
given word in the entire document. IDF show how common or rare a given word is across all
documents. TF-IDF can be computed as tf * idf
TF-IDF do not convert directly raw data into useful features. Firstly, it converts raw strings or
dataset into vectors and each word has its own vector. Then we’ll use a particular technique
for retrieving the feature like Cosine Similarity which works on vectors, etc.
Terminology
t — term (word)
N — count of corpus
Step 1: Term Frequency (TF): Suppose we have a set of English text documents and wish
to rank which document is most relevant to the query, “Data Science is awesome!” A simple
way to start out is by eliminating documents that do not contain all three words “Data” is”,
“Science”, and “awesome”, but this still leaves many documents. To further distinguish them,
we might count the number of times each term occurs in each document; the number of times
a term occurs in a document is called its term frequency. The weight of a term that occurs in a
document is simply proportional to the term frequency.
Step 2: Document Frequency: This measures the importance of document in whole set of
corpora, this is very similar to TF. The only difference is that TF is frequency counter for a
term t in document d, whereas DF is the count of occurrences of term t in the document set N.
In other words, DF is the number of documents in which the word is present. We consider
one occurrence if the term consists in the document at least once, we do not need to know the
number of times the term is present.
df (t)=occurrence of t∈documents
Step 3: Inverse Document Frequency (IDF): While computing TF, all terms are considered
equally important. However, it is known that certain terms, such as “is”, “of”, and “that”, may
appear a lot of times but have little importance. Thus, we need to weigh down the frequent
terms while scale up the rare ones, by computing IDF, an inverse document frequency factor
is incorporated which diminishes the weight of terms that occur very frequently in the
document set and increases the weight of terms that occur rarely. The IDF is the inverse of
the document frequency which measures the informativeness of term t. When we calculate
IDF, it will be very low for the most occurring words such as stop words (because stop words
such as “is” is present in almost all of the documents, and N/df will give a very low value to
that word). This finally gives what we want, a relative weightage.
Now there are few other problems with the IDF, in case of a large corpus, say 100,000,000,
the IDF value explodes, to avoid the effect we take the log of idf . During the query time,
when a word which is not in vocab occurs, the df will be 0. As we cannot divide by 0, we
smoothen the value by adding 1 to the denominator.
The TF-IDF now is at the right measure to evaluate how important a word is to a document in
a collection or corpus. Here are many different variations of TF-IDF but for now let us
concentrate on this basic version.
Step 4: Implementing TF-IDF: To make TF-IDF from scratch in python, let’s imagine those
two sentences from different document:
first sentence: “Data Science is the sexiest job of the 21st century”.
Deep learning is a new research direction in the field of artificial intelligence. It is developed
on the basis of shallow neural networks with the improvement of computer hardware levels
and the explosive growth of the current data volume. Deep learning and shallow neural
network structure are both layered. Each layer will process the data input to the model and
combine low-level features into potential high-level features by learning data rules.
Compared with shallow models, deep learning can express complex high dimensionality such
as high-variable functions and find the true relationships within the original data better. In the
1980s, artificial neural network back propagation algorithm was born. This method can
automatically learn data rules from a large amount of training data without manual
intervention. At present, deep learning is the most concerned research direction in the field of
artificial intelligence, which completely subverts the shallow model in traditional machine,
proposes a deep learning network model, and elevates it to a new height from theory to
application. CNN (convolutional neural network) and RNN are two types of classical deep
learning network structures now.
Because there are connections between neurons in the RNN layer, the network can learn the
change law of sequence data before and after, and the internal sequence rules of data is easy
to be mined. Thus, RNN is widely used in the field of sequence data processing such as
speech recognition and machine translation. However, this structure also has some problems.
When data is transmitted backward, the problem of gradient disappearance or gradient
explosion is unavoidable, which limits its processing of long-term dependencies. The LSTM
network changes the way of gradient transmission during backpropagation by adding
multiple special computing nodes in the hidden layer of RNN, which effectively slows the
problem of gradient disappearance or gradient explosion. Its model structure is shown in
Figure 4.5.
Where ht−1 represents the output of the previous cell, and x t represents the input of the current
cell. σ represents the sigmoid function. The difference between LSTM and RNN is that it
adds a ‘‘processor’’ to the algorithm to determine the usefulness of the information. The
structure of this processor is called a cell. Three gates are placed in a cell, which are called
Input gate, Forget gate, and Output gate. A piece of information enters the LSTM network,
and it can be judged whether it is useful according to the rules. Only the information that
meets the algorithm authentication will be left, and the non-conforming information will be
forgotten through the Forget gate.
FORGET GATE
The first step for data entering the LSTM is to decide what information should be lost and
what retained. This decision is made by the Forget gate, which reads h and x and outputs a
value between 0 and 1, where 1 means ‘‘complete reserved’’, 0 means ‘‘completely
discarded’’. Forget gate is calculated as:
In the formula, ft is the calculation result of the Forget gate which is mainly used to control
the retention of the information transmitted from the unit state at the previous moment to the
unit state at the current moment. [ ] indicates that the two vectors are spliced, h t−1 is the output
of the unit at the previous moment, and are the weight and bias of Forget gate, W f and bf are
Sigmoid activation functions.
INPUT GATE
Input gate determines the addition of new information, and its operation process includes
sigmoid layer and tanh layer. The sigmoid layer determines the information that needs to be
updated. The calculation formula is:
In the formula, it is the calculation result of the input gate, and the input gate also has
independent weight and bias. The role of the tanh layer is to generate a vector of candidate
update information. Its calculation formula is:
~
Ct is the unit state of the current input, the unit state of the current moment is C t, and its
calculation formula is:
OUTPUT GATE
Output gate is roughly the same as the Input gate, and its operation flow includes sigmoid
layer and tanh layer. The sigmoid layer determines the output part of the information, and the
calculation formula is:
The forward propagation of LSTM calculates the cell state C t and ht the output of the current
moment and completes the forward propagation calculation of the network. The
backpropagation of LSTM is like the back-propagation principle of RNN. Finally, the
weights and biases of all parts of the network are updated to complete the model training.
4.5.1 RNN
Deep neural networks are a network with automatic adjustment of network parameters, which
can iteratively calculate data according to the set coordinates and models. The training
process of deep learning model is actually a process of constantly tuning the ownership
values of nodes which are all used as tools to describe data features. The key to whether the
model can describe the features of things lies on the final training results of each weight. The
deep neural network takes the neural network as the carrier and focuses on the depth. It can
be said to be a general term, including the recurrent neural network with multiple hidden
layers, the all-connected network and the convolutional neural network. Recurrent neural
networks are mainly used for sequence data processing and have a certain memory effect.
The long-term and short-term memory networks derived from them are better at processing
long-term dependencies. Convolutional neural networks focus on spatial mapping. And image
data is particularly suitable for feature extraction of various networks. When the input data is
dependent and sequential, the results of CNN are generally not good. There is no correlation
between the previous input of CNN and the next input. The RNN network appeared in the
1980s. It is designed a different number of hidden layers. Each hidden layer stores
information and selectively forgets some information. In this way, the data characteristics of
the sequence changes of the data can be extracted. RNN has not only achieved many results
in the fields of text processing and speech processing, but also been widely used in the fields
of speech recognition, machine translation, text generation, sentiment analysis, and video
behavior recognition. RNN is good at processing time series data and can describe the
context of the data on the time axis. The RNN structure is shown in the Fig. 4.6.
As can be seen from the figure above, the RNN structure is relatively simple. It
mainly consists of an Input Layer, a Hidden Layer, an Output Layer, and an arrow in the
Hidden Layer represents the cyclic update of data, which is the method to realize the time
memory function. The input levels of this paper were: age, BMI, marital status, education
level, family income, alcohol consumption, smoking, exposure to high temperature, noise,
shift work. The 10-dimensional data were normalized and input into the RNN model. After
the extraction of hidden layer depth features, the output layer output the sequence of lipid
health status, in which 1 represented normal lipid status and 0 represented abnormal lipid
status.
Figure 4.7 shows the hierarchical expansion of the Hidden Layer. T −1, t, t +1 represent the
time series. X represents the input sample. St represents the memory of the sample at time t.
W represents the weight of the input. U indicates the weight of the input sample at this
moment, and V indicates the weight of the output sample.
At time t = 1, generally initialize the input, randomly initialize W, U, V, and perform the
following formula calculation:
Among them, f and g are activation functions, where f can be activation functions such as
tanh, ReLU, sigmoid. G is usually a SoftMax function. Time advancing, the state s1 as the
memory state of time 1 will participate in the prediction activity of the next time, that is:
And so on, the final output value can be obtained as:
The back propagation process of RNN is the updating process of weight parameters W, U,
and V. Each output value ot will produce an error value Et, tanh the total error value can be
expressed as: Since the output of each step depends on not only the network of the current
step but also the state of the previous steps, the Backpropagation Through Time (BPTT)
algorithm is used to pass the error value at the output back, and the gradient descent method
is used to perform the weight update.
The model training process of RNN is shown in Fig. 4.8.
CHAPTER 5
UML DIAGRAMS
UML stands for Unified Modeling Language. UML is a standardized general-purpose
modeling language in the field of object-oriented software engineering. The standard is
managed, and was created by, the Object Management Group. The goal is for UML to
become a common language for creating models of object-oriented computer software. In its
current form UML is comprised of two major components: a Meta-model and a notation. In
the future, some form of method or process may also be added to; or associated with, UML.
GOALS: The Primary goals in the design of the UML are as follows:
Provide users a ready-to-use, expressive visual modeling Language so that they can
develop and exchange meaningful models.
Provide extendibility and specialization mechanisms to extend the core concepts.
Be independent of particular programming languages and development process.
Provide a formal basis for understanding the modeling language.
Encourage the growth of OO tools market.
Support higher level development concepts such as collaborations, frameworks,
patterns and components.
Integrate best practices.
Class Diagram
The class diagram is used to refine the use case diagram and define a detailed design of the
system. The class diagram classifies the actors defined in the use case diagram into a set of
interrelated classes. The relationship or association between the classes can be either an “is-a”
or “has-a” relationship. Each class in the class diagram may be capable of providing certain
functionalities. These functionalities provided by the class are termed “methods” of the class.
Apart from this, each class may have certain “attributes” that uniquely identify the class.
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented
as use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles of the actors
in the system can be depicted.
Data Flow Diagram
A data flow diagram (DFD) is a graphical or visual representation using a standardized set of
symbols and notations to describe a business’s operations through data movement.
Sequence Diagram
A deployment diagram in the Unified Modeling Language models the physical deployment of
artifacts on nodes. To describe a web site, for example, a deployment diagram would show
what hardware components (“nodes”) exist (e.g., a web server, an application server, and a
database server), what software components (“artifacts”) run on each node (e.g., web
application, database), and how the different pieces are connected (e.g., JDBC, REST, RMI).
The nodes appear as boxes, and the artifacts allocated to each node appear as rectangles
within the boxes. Nodes may have sub nodes, which appear as nested boxes. A single node in
a deployment diagram may conceptually represent multiple physical nodes, such as a cluster
of database servers.
Component diagram: Component diagram describes the organization and wiring of the
physical components in a system.
CHAPTER 6
SOFTWARE ENVIRONMENT
What is Python?
The biggest strength of Python is huge collection of standard library which can be used for
the following –
Machine Learning
GUI Applications (like Kivy, Tkinter, PyQt etc. )
Web frameworks like Django (used by YouTube, Instagram, Dropbox)
Image processing (like Opencv, Pillow)
Web scraping (like Scrapy, BeautifulSoup, Selenium)
Test frameworks
Multimedia
Advantages of Python
Python downloads with an extensive library and it contain code for various purposes like
regular expressions, documentation-generation, unit-testing, web browsers, threading,
databases, CGI, email, image manipulation, and more. So, we don’t have to write the
complete code for that manually.
2. Extensible
As we have seen earlier, Python can be extended to other languages. You can write some of
your code in languages like C++ or C. This comes in handy, especially in projects.
3. Embeddable
Complimentary to extensibility, Python is embeddable as well. You can put your Python code
in your source code of a different language, like C++. This lets us add scripting capabilities to
our code in the other language.
4. Improved Productivity
The language’s simplicity and extensive libraries render programmers more productive than
languages like Java and C++ do. Also, the fact that you need to write less and get more things
done.
5. IOT Opportunities
Since Python forms the basis of new platforms like Raspberry Pi, it finds the future bright for
the Internet Of Things. This is a way to connect the language with the real world.
When working with Java, you may have to create a class to print ‘Hello World’. But in
Python, just a print statement will do. It is also quite easy to learn, understand, and code. This
is why when people pick up Python, they have a hard time adjusting to other more verbose
languages like Java.
7. Readable
Because it is not such a verbose language, reading Python is much like reading English. This
is the reason why it is so easy to learn, understand, and code. It also does not need curly
braces to define blocks, and indentation is mandatory. This further aids the readability of the
code.
8. Object-Oriented
This language supports both the procedural and object-oriented programming paradigms.
While functions help us with code reusability, classes and objects let us model the real world.
A class allows the encapsulation of data and functions into one.
9. Free and Open-Source
Like we said earlier, Python is freely available. But not only can you download Python for
free, but you can also download its source code, make changes to it, and even distribute it. It
downloads with an extensive collection of libraries to help you with your tasks.
10. Portable
When you code your project in a language like C++, you may need to make some changes to
it if you want to run it on another platform. But it isn’t the same with Python. Here, you need
to code only once, and you can run it anywhere. This is called Write Once Run Anywhere
(WORA). However, you need to be careful enough not to include any system-dependent
features.
11. Interpreted
Lastly, we will say that it is an interpreted language. Since statements are executed one by
one, debugging is easier than in compiled languages.
Any doubts till now in the advantages of Python? Mention in the comment section.
Almost all of the tasks done in Python requires less coding when the same task is done in
other languages. Python also has an awesome standard library support, so you don’t have to
search for any third-party libraries to get your job done. This is the reason that many people
suggest learning Python to beginners.
2. Affordable
Python is free therefore individuals, small companies or big organizations can leverage the
free available resources to build applications. Python is popular and widely used so it gives
you better community support.
The 2019 Github annual survey showed us that Python has overtaken Java in the most
popular programming language category.
3. Python is for Everyone
Python code can run on any machine whether it is Linux, Mac or Windows. Programmers
need to learn different languages for different jobs but with Python, you can professionally
build web apps, perform data analysis and machine learning, automate things, do web
scraping and also build games and powerful visualizations. It is an all-rounder programming
language.
Disadvantages of Python
So far, we’ve seen why Python is a great choice for your project. But if you choose it, you
should be aware of its consequences as well. Let’s now see the downsides of choosing Python
over another language.
We have seen that Python code is executed line by line. But since Python is interpreted, it
often results in slow execution. This, however, isn’t a problem unless speed is a focal point
for the project. In other words, unless high speed is a requirement, the benefits offered by
Python are enough to distract us from its speed limitations.
While it serves as an excellent server-side language, Python is much rarely seen on the client-
side. Besides that, it is rarely ever used to implement smartphone-based applications. One
such application is called Carbonnelle.
The reason it is not so famous despite the existence of Brython is that it isn’t that secure.
3. Design Restrictions
As you know, Python is dynamically typed. This means that you don’t need to declare the
type of variable while writing the code. It uses duck-typing. But wait, what’s that? Well, it
just means that if it looks like a duck, it must be a duck. While this is easy on the
programmers during coding, it can raise run-time errors.
5. Simple
No, we’re not kidding. Python’s simplicity can indeed be a problem. Take my example. I
don’t do Java, I’m more of a Python person. To me, its syntax is so simple that the verbosity
of Java code seems unnecessary.
This was all about the Advantages and Disadvantages of Python Programming Language.
NumPy
It is the fundamental package for scientific computing with Python. It contains various
features including these important ones:
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional
container of generic data. Arbitrary datatypes can be defined using NumPy which allows
NumPy to seamlessly and speedily integrate with a wide variety of databases.
Pandas
For simple plotting the pyplot module provides a MATLAB-like interface, particularly when
combined with Ipython. For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface or via a set of functions
familiar to MATLAB users.
Scikit – learn
There have been several updates in the Python version over the years. The question is how to
install Python? It might be confusing for the beginner who is willing to start learning Python
but this tutorial will solve your query. The latest or the newest version of Python is version
3.7.4 or in other words, it is Python 3.
Note: The python version 3.7.4 cannot be used on Windows XP or earlier devices.
Before you start with the installation process of Python. First, you need to know about your
System Requirements. Based on your system type i.e. operating system and based processor,
you must download the python version. My system type is a Windows 64-bit operating
system. So the steps below are to install python version 3.7.4 on Windows 7 device or to
install Python 3. Download the Python Cheatsheet here.The steps on how to install Python on
Windows 10, 8 and 7 are divided into 4 parts to help understand better.
Step 1: Go to the official site to download and install python using Google Chrome or any
other web browser. OR Click on the following link: https://www.python.org
Now, check for the latest and the correct version for your operating system.
Step 4: Scroll down the page until you find the Files option.
Step 5: Here you see a different version of python along with the operating system.
To download Windows 32-bit python, you can select any one from the three options:
Windows x86 embeddable zip file, Windows x86 executable installer or Windows x86
web-based installer.
To download Windows 64-bit python, you can select any one from the three options:
Windows x86-64 embeddable zip file, Windows x86-64 executable installer or
Windows x86-64 web-based installer.
Here we will install Windows x86-64 web-based installer. Here your first part regarding
which version of python is to be downloaded is completed. Now we move ahead with the
second part in installing python i.e. Installation
Note: To know the changes or updates that are made in the version you can click on the
Release Note Option.
Installation of Python
Step 1: Go to Download and Open the downloaded python version to carry out the
installation process.
Step 2: Before you click on Install Now, Make sure to put a tick on Add Python 3.7 to PATH.
Step 3: Click on Install NOW After the installation is successful. Click on Close.
With these above three steps on python installation, you have successfully and correctly
installed Python. Now is the time to verify the installation.
Step 4: Let us test whether the python is correctly installed. Type python –V and press Enter.
Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program
Step 4: To go ahead with working in IDLE you must first save the file. Click on File > Click
on Save
Step 5: Name the file and save as type should be Python files. Click on SAVE. Here I have
named the files as Hey World.
Step 6: Now for e.g. enter print (“Hey World”) and Press Enter.
You will see that the command given is launched. With this, we end our tutorial on how to
install Python. You have learned how to download python for windows into your respective
operating system.
Note: Unlike Java, Python does not need semicolons at the end of the statements otherwise it
won’t work.
CHAPTER 7
SYSTEM REQUIREMENTS
Software Requirements
The functional requirements or the overall description documents include the product
perspective and features, operating system and operating environment, graphics requirements,
design constraints and user documentation.
The appropriation of requirements and implementation constraints gives the general overview
of the project in regard to what the areas of strength and deficit are and how to tackle them.
Minimum hardware requirements are very dependent on the particular software being
developed by a given Enthought Python / Canopy / VS Code user. Applications that need to
store large arrays/objects in memory will require more RAM, whereas applications that need
to perform numerous calculations or tasks more quickly will require a faster processor.
CHAPTER 8
FUNCTIONAL REQUIREMENTS
Output Design
Outputs from computer systems are required primarily to communicate the results of
processing to users. They are also used to provides a permanent copy of the results for later
consultation. The various types of outputs in general are:
Output Definition
The outputs should be defined in terms of the following points:
Input Design
Input design is a part of overall system design. The main objective during the input design is
as given below:
Input Stages
Data recording
Data transcription
Data conversion
Data verification
Data control
Data transmission
Data validation
Data correction
Input Types
It is necessary to determine the various types of inputs. Inputs can be categorized as follows:
Input Media
At this stage choice has to be made about the input media. To conclude about the input media
consideration has to be given to;
Type of input
Flexibility of format
Speed
Accuracy
Verification methods
Rejection rates
Ease of correction
Storage and handling requirements
Security
Easy to use
Portability
Keeping in view the above description of the input types and input media, it can be said that
most of the inputs are of the form of internal and interactive. As
Input data is to be the directly keyed in by the user, the keyboard can be considered to be the
most suitable input device.
Error Avoidance
At this stage care is to be taken to ensure that input data remains accurate form the stage at
which it is recorded up to the stage in which the data is accepted by the system. This can be
achieved only by means of careful control each time the data is handled.
Error Detection
Even though every effort is make to avoid the occurrence of errors, still a small proportion of
errors is always likely to occur, these types of errors can be discovered by using validations to
check the input data.
Data Validation
Procedures are designed to detect errors in data at a lower level of detail. Data validations
have been included in the system in almost every area where there is a possibility for the user
to commit errors. The system will not accept invalid data. Whenever an invalid data is keyed
in, the system immediately prompts the user and the user has to again key in the data and the
system will accept the data only if the data is correct. Validations have been included where
necessary.
The system is designed to be a user friendly one. In other words the system has been
designed to communicate effectively with the user. The system has been designed with
popup menus.
It is essential to consult the system users and discuss their needs while designing the user
interface:
User initiated interface the user is in charge, controlling the progress of the
user/computer dialogue. In the computer-initiated interface, the computer selects the
next stage in the interaction.
Computer initiated interfaces
In the computer-initiated interfaces the computer guides the progress of the user/computer
dialogue. Information is displayed and the user response of the computer takes action or
displays further information.
Command driven interfaces: In this type of interface the user inputs commands or
queries which are interpreted by the computer.
Forms oriented interface: The user calls up an image of the form to his/her screen and
fills in the form. The forms-oriented interface is chosen because it is the best choice.
Computer-Initiated Interfaces
Right from the start the system is going to be menu driven, the opening menu displays the
available options. Choosing one option gives another popup menu with more options. In this
way every option leads the users to data entry form where the user can key in the data.
The design of error messages is an important part of the user interface design. As user is
bound to commit some errors or other while designing a system the system should be
designed to be helpful by providing the user with information regarding the error he/she has
committed.
This application must be able to produce output at different modules for different inputs.
Performance Requirements
The requirement specification for any system can be broadly stated as given below:
SOURCE CODE
#An Innovative System for Monitoring Emotional Health to Identify Individuals at Risk of
Psychological Disturbances
import numpy as np
import pandas as pd
import warnings
warnings.filterwarnings('ignore')
import json
df = pd.DataFrame(data['intents'])
df
for i in range(len(df)):
for j in range(len(ptrns)):
dic['tag'].append(tag)
dic['patterns'].append(ptrns[j])
dic['responses'].append(rspns)
df = pd.DataFrame.from_dict(dic)
df
df['tag'].unique()
tokenizer.fit_on_texts(df['patterns'])
tokenizer.get_config()
vacab_size = len(tokenizer.word_index)
ptrn2seq = tokenizer.texts_to_sequences(df['patterns'])
X = pad_sequences(ptrn2seq, padding='post')
lbl_enc = LabelEncoder()
y = lbl_enc.fit_transform(df['tag'])
import tensorflow
model = Sequential()
model.add(Input(shape=(X.shape[1])))
model.add(LSTM(32, return_sequences=True))
model.add(LayerNormalization())
model.add(LSTM(32, return_sequences=True))
model.add(LayerNormalization())
model.add(LSTM(32))
model.add(LayerNormalization())
model.add(Dense(128, activation="relu"))
model.add(LayerNormalization())
model.add(Dropout(0.2))
model.add(Dense(128, activation="relu"))
model.add(LayerNormalization())
model.add(Dropout(0.2))
model.add(Dense(len(np.unique(y)), activation="softmax"))
model.compile(optimizer='adam', loss="sparse_categorical_crossentropy",
metrics=['accuracy'])
model.summary()
plot_model(model, show_shapes=True)
model_history = model.fit(x=X,
y=y,
batch_size=10,
callbacks=[tensorflow.keras.callbacks.EarlyStopping(monitor='accuracy',
patience=3)],
epochs=50)
import re
import random
def generate_answer(pattern):
text = []
txt = re.sub('[^a-zA-Z\']', ' ', pattern)
txt = txt.lower()
txt = txt.split()
text.append(txt)
x_test = tokenizer.texts_to_sequences(text)
x_test = np.array(x_test).squeeze()
y_pred = model.predict(x_test)
y_pred = y_pred.argmax()
tag = lbl_enc.inverse_transform([y_pred])[0]
print("you: {}".format(pattern))
print("model: {}".format(random.choice(responses)))
generate_answer('help me:')
generate_answer(':')
def chatbot():
print("Chatbot: Hi! I'm your friendly chatbot. How can I assist you today?")
while True:
user_input = input("You: ")
print("Chatbot: Goodbye!")
break
generate_answer(user_input)
if __name__ == "__main__":
chatbot()
CHAPTER 10
This project implements a chatbot system using deep learning techniques to understand and
generate responses to user input. In summary, this loads a dataset of intents, trains a chatbot
model using a sequential neural network with LSTM layers, and allows users to interact with
the chatbot in a simple text-based conversation. The chatbot responds to user input based on
patterns learned during training. Let's break down the implementation step by step:
The json library is used to read data from a file named 'intents.json.'
Loading Data:
It opens and reads the 'intents.json' file, which presumably contains a dataset for training the
chatbot.
Data Preparation:
The code extracts the 'intents' data from the JSON file and converts it into a pandas
DataFrame named 'df.'
It creates a dictionary 'dic' to store 'tag,' 'patterns,' and 'responses' data separately.
Data Transformation:
The code loops through the DataFrame 'df' and extracts 'patterns,' 'responses,' and 'tag' for
each intent.
DataFrame Reconstruction:
A new DataFrame 'df' is created from the 'dic' dictionary, combining 'tag,' 'patterns,' and
'responses.'
Tokenization:
The code imports the Tokenizer class from the Keras library and tokenizes the
'patterns' data in 'df.'
Sequence Padding:
The code uses the pad_sequences function to pad the tokenized sequences to
the same length, making them suitable for training.
Label Encoding:
The labels ('tag') are encoded using sklearn's LabelEncoder, and the encoded
values are stored in 'y.'
Model Definition:
It ends with a softmax activation layer with the number of classes equal to the
unique tags in the dataset.
The model is compiled with the Adam optimizer and sparse categorical cross-
entropy loss.
Model Summary:
The model summary is printed, showing the architecture and the number of
parameters.
Model Training:
The model is trained on the tokenized and padded input data 'X' and the
encoded labels 'y.'
The training includes early stopping based on accuracy and runs for 50
epochs.
It preprocesses the input text, tokenizes it, and uses the trained model to
predict the tag.
It retrieves random responses from the dataset based on the predicted tag and
prints them.
User Interactions:
Users can type 'quit,' 'exit,' 'q,' or 'bye' to exit the chatbot loop.
Main Execution:
The 'chatbot' function is executed if the script is run directly.
Tag: The "tag" column represents a categorical label or tag associated with a specific
intent or category of user input. In the context of a chatbot or NLP model, these tags
typically correspond to different topics, commands, or purposes that the chatbot is
designed to recognize and respond to. For example, tags include "greeting,"
"farewell," "information request," "emotions," etc.
Patterns: The "patterns" column contains textual patterns or user input examples that
are associated with each tag. These patterns serve as training data for the chatbot or
NLP model to learn how to recognize the user's intent or request. Patterns can be in
the form of sentences, phrases, or keywords. Each pattern is used to teach the model
what kind of user input corresponds to a particular tag.
Responses: The "responses" column includes predefined responses or messages that
the chatbot should provide when it recognizes a specific tag or user intent. These
responses are the chatbot's way of interacting with the user and providing relevant
information or assistance based on the detected intent. Responses can vary depending
on the tag and may include greetings, answers to questions, instructions, or any other
appropriate text.
Figure 1(a) displays a portion of the original dataset used for training the chatbot. It shows
examples of intents or patterns along with their corresponding tags and responses. Figure 1(b)
shows how the original dataset has been structured after converting it into a panda
DataFrame. It focuses on the 'patterns' and 'tags' columns. The 'patterns' column contains the
input text or user queries. The 'tags' column contains labels or categories associated with the
input patterns.
(a)
(b)
Figure 1: Display of the sample dataset. (a) original dataset. (b) dataset after converting into a
data frame with patterns and tags.
Figure 2 displays a summary of the unique values found in the 'tag' column of the DataFrame.
It shows the different categories or tags that the chatbot has been trained to recognize. It
provides an overview of the classes or intents that the chatbot can identify.
Figure 2: Presents the unique values of column tag.
Figure 5: Sample predicted conversation between patient and proposed model for monitoring
emotional health.
Figure 4 displays the training performance metrics of the LSTM model over a series of
epochs. This shows how the accuracy of the model changes with each training epoch. The
proposed model obtained an accuracy of 99.57%. It also shows the training loss, which
measures how well the model’s predictions match the actual target values during training.
Lower values indicate better performance. The proposed model achieves 0.0347 of loss.
Figure 5 illustrates a sample conversation between a patient or user and the chatbot model
designed to monitor emotional health. It showcases how the chatbot responds to user input,
providing an example of a simulated interaction. The conversation includes user queries and
the chatbot's generated responses, demonstrating the chatbot's functionality.
CHAPTER 11
CONCLUSIONS AND FUTURE SCOPE
In conclusion, the implementation of an LSTM-based chatbot designed to monitor emotional
health and identify individuals at risk of psychological disturbances represents a significant
step forward in the utilization of technology for mental health support. This chatbot
showcases its ability to effectively engage in conversations with users and provide responses
based on patterns learned from the 'intents.json' dataset. This highlights the potential of
natural language processing (NLP) techniques to comprehend and address user emotions and
concerns, offering a unique avenue for mental health assistance. One of the standout features
of this chatbot is its capability to detect individuals at risk of psychological disturbances. By
analyzing user input, it can promptly identify potential issues, enabling timely intervention
and support. This proactive approach holds the promise of early intervention, which is crucial
for preventing the escalation of mental health challenges and ensuring individuals receive the
necessary assistance when they need it most.
Moreover, the accessibility offered by chatbots is a key advantage. Users can comfortably
express their emotions and seek help through this platform, which can alleviate some of the
barriers and stigma associated with discussing mental health concerns. This accessibility
aspect is especially valuable in reaching individuals who may be hesitant to seek help through
traditional channels. Additionally, the chatbot system has the potential to amass a substantial
dataset of user interactions. Analyzing this data can yield valuable insights into user behavior,
common mental health issues, and the effectiveness of various interventions. Such data-
driven insights can inform the ongoing development and refinement of mental health support
systems.
Future Scope
Looking ahead, there are several avenues for enhancing and expanding the capabilities of this
chatbot system. Advanced NLP techniques, including sentiment analysis and emotion
recognition, can be integrated to enable the chatbot to better understand and respond to the
subtle nuances of human emotions. Multimodal support, encompassing audio and visual
inputs, can provide a more comprehensive understanding of a user's emotional state.
Personalization is another critical aspect of future development. By tailoring responses and
interventions based on a user's historical data and preferences, the chatbot can offer more
effective and empathetic support. Integration with mental health professionals or crisis
hotlines can be explored to ensure that cases requiring immediate human intervention are
promptly addressed.
REFERENCES
[1] G. Miner, L. Miner, M. Goldstein et al., Practical Predictive Analytics and Decisioning
Systems for Medicine: Informatics Accuracy and Cost-Effectiveness for Healthcare
Administration and Delivery Including Medical Research, Academic Press, Inc.,
Cambridge, MA, USA, 1st edition, 2016.
[2] M. Hamilton, “Development of a rating scale for primary depressive illness,” British
Journal of Social and Clinical Psychology, vol. 6, no. 4, pp. 278–296, 1967.
[3] American Psychiatric Association, Diagnostic and Statistical Manual of Mental
Disorders, American Psychiatric Association, Reston, VA, USA, 2013.
[4] M. I. Jordan and T. M. Mitchell, “Machine learning: trends, perspectives, and
prospects,” Science, vol. 349, no. 6245, pp. 255–260, 2015.
[5] F. Dabek and J. J. Caban, “A neural network-based model for predicting psychological
conditions,” in Brain Informatics and Health, pp. 252–261, Springer International
Publishing, Berlin, Germany, 2015.
[6] G. Cho, J. Yim, Y. Choi, J. Ko, and S.-H. Lee, “Review of machine learning algorithms
for diagnosing mental illness,” Psychiatry Investigation, vol. 16, no. 4, pp. 262–269,
2019.
[7] E. G. Pintelas, T. Kotsilieris, I. E. Livieris, and P. Pintelas, “A review of machine
learning prediction methods for anxiety disorders,” in Proceedings of the 8th
International Conference on Software Development and Technologies for Enhancing
Accessibility and Fighting Info-Exclusion—DSAI 2018, The-ssaloniki, Greece, 2018.
[8] R. B. Rutledge, A. M. Chekroud, and Q. J. Huys, “Machine learning and big data in
psychiatry: toward clinical applications,” Current Opinion in Neurobiology, vol. 55, pp.
152–159, 2019.
[9] 130 Executive Board, “Global burden of mental disorders and the need for a
comprehensive, coordinated response from health and social workers at the country
level,” 2012, https:// apps.who.int/iris/handle/10665/23741.
[10] M. Hadzic, M. Chen, and T. S. Dillon, “Towards the mental health ontology,” in
Proceedings of the 2008 IEEE International Conference on Bioinformatics and
Biomedicine, Philadelphia, PA, USA, 2008.
[11] J. Diederich, A. Al-Ajmi, and P. Yellowlees, “Ex-ray: data mining and mental health,”
Applied Soft Computing, vol. 7, no. 3, pp. 923–928, 2007.
[12] D. Greenstein, J. D. Malley, B. Weisinger, L. Clasen, and N. Gogtay, “Using
multivariate machine learning methods and structural MRI to classify childhood onset
schizophrenia and healthy controls,” Frontiers in Psychiatry, vol. 3, 2012.
[13] Y. T. Jo, S. W. Joo, S. H. Shon, H. Kim, Y. Kim, and J. Lee, “Diagnosing
schizophrenia with network analysis and a machine learning method,” International
Journal of Methods in Psychiatric Research, vol. 29, no. 1, 2020.
[14] H. Yang, J. Liu, J. Sui, G. Pearlson, and V. D. Calhoun, “A hybrid machine learning
method for fusing fMRI and genetic data: combining both improves classification of
schizophrenia,” Frontiers in Human Neuroscience, vol. 4, 2010.
[15] S. Srinivasagopalan, J. Barry, V. Gurupur, and S. Thankachan, “A deep learning
approach for diagnosing schizophrenic patients,” Journal of Experimental & Aeoretical
Artificial Intelligence, vol. 31, no. 6, pp. 803–816, 2019.
[16] R. N. Plaschke, E. C. Cieslik, V. I. M¨uller et al., “On the ¨ integrity of functional
brain networks in schizophrenia, Parkinson’s disease, and advanced age: evidence from
connectivity-based single-subject classification,” Human Brain Mapping, vol. 38, no.
12, pp. 5845–5858, 2017.
[17] W. H. L. Pinaya, A. Gadelha, O. M. Doyle et al., “Using deep belief network
modelling to characterize differences in brain morphometry in schizophrenia,”
Scientific Reports, vol. 6, no. 1, 2016.
[18] W. H. L. Pinaya, A. Mechelli, and J. R. Sato, “Using deep autoencoders to identify
abnormal brain structural patterns in neuropsychiatric disorders: a large-scale multi-
sample study,” Human Brain Mapping, vol. 40, no. 3, pp. 944–954, 2018.
[19] A. M. Chekroud, R. J. Zotti, Z. Shehzad et al., “Cross-trial prediction of treatment
outcome in depression: a machine learning approach,” Ae Lancet Psychiatry, vol. 3, no.
3, pp. 243–250, 2016.
[20] A. Ahmed, R. Sultana, M. T. R. Ullas, M. Begom, M. M. I. Rahi, and M. A. Alam, “A
machine learning approach to detect depression and anxiety using supervised learning,”
in Proceedings of the 2020 IEEE Asia-Pacific Conference on Computer Science and
Data Engineering (CSDE), Gold Coast, Australia, 2019.