SlideShare a Scribd company logo
1 of 15
Download to read offline
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
1
An Artificial Neural Network Based Medical Diagnosis of Mental Health Diseases
Abstract
In this research paper, we explore Artificial Neural Network (ANN) in Medical Diagnosis of Mental Health
Diseases. The focus area was two mental health conditions, namely Bipolar Disorder and Schizophrenia.
Additionally, we used two main ANN learning algorithms to predict the diagnosis for mental health illness
based on the symptoms for the two mental health diseases we are focusing on. The two algorithms are
Perceptron and Adaline. Also, we implemented the two learning algorithms and four activation functions
that were used to train the ANN. The four activation functions are Binary Step, Linear, Sigmoid Logistic and
Hyperbolic Tangent.
We also trained the Perceptron algorithm using the binary step function, the sigmoid logistic
function and the hyperbolic tangent function. For the Adaline algorithm, we used the linear activation
function, the sigmoid logistic activation function and the hyperbolic tangent activation function for the
training. Results from our work show that perceptron is very effective at predicting the diagnosis for the
two mental health diseases, especially using the binary step activation function. Adaline algorithm was
not very effective at predicting the probability of a patient having any of the two diseases, particularly
using the linear activation function. It performed a little bit okay with the other two activation function
implemented. However, the Perceptron algorithm implemented was able to predict if a patient has any of
the two mental conditions. The output for the perceptron algorithms was a binary value with 1 indicating
that patient has the disease and 0 indicating that patient does not have the disease.
Introduction
Artificial Neural Network is a sub-field of Artificial Intelligence (AI). This branch of AI is widely used in
various branches of Arts, Science and Technology. Lately, there have been several innovations of AI in the
Health sector. For instance, Amason Web Service (AWS) has introduced HealthScribe which lets Health
Care Software Vendors develop applications that automatically generate clinical notes by analyzing Patient
–Clinician conversations. HealthScribe uses Speech Recognition and Generative AI to achieve this. There
have also been some research into using Artificial Neural Network in Medical Diagnosis. Also, ANN has
been used in diagnosis of colorectal cancer, multiple sclerosis lesion, colon cancer, pancreatic disease,
gynecological disease and early diabetes [2].
According to an article about AI in Medical Diagnostics, the global AI in medical diagnostic market
in terms of revenue was estimated to be $ 1.3 billion in 2023 and is expected to reach $ 3.7 billion by 2028
growing at a compound annual growth rate (CAGR) of 23.2% [3]. The article also explains that companies
hoping to use AI to develop medical software need a workforce with a certain skill set for developing,
managing and implementing AI systems [3]. For instance, cognitive computing, machine learning, deep
learning and image recognition [3]. Also integrating AI solutions into existing system needs extensive data
processing for replicating human brain behaviour [3].
This paper is a research paper that seeks to investigate artificial neural network based medical
diagnosis. The focus of this paper is to explore the diagnosis of mental health disease using artificial neural
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
2
network. The motivation behind this research paper is to streamline the diagnosis process of mental health
diseases and avoid misdiagnosis. Additionally, Artificial Neural Network can handle diverse kinds of
medical data.
The scope of the paper is two main mental health diseases namely, Bipolar Disorder and
Schizophrenia. Also, with regards to medical data that will be used we will stick to symptoms captured in
patient-doctor conversations. As such, this paper does not discuss anything related to speech recognition.
The aim is to build a neural network that takes a number of symptoms associated with mental health
disease and then uses it to predict the diagnosis for a mental health disease.
Background
In this section we give a concise background about Artificial Neural Network (ANN).
Artificial Neural Network
An ANN is a mathematical representation of the human neural architecture, reflecting its learning and
generalization abilities [2]. ANN is widely used in research because it can model highly non-linear systems
in which the relation among the variables is unknow or very complex [2]. The basic elements of an ANN
are Artificial Neurons, Weight and Biases, activation Functions and Layers of Neurons [1]. There are three
layers of neurons, namely, Input Layer, Hidden Layer and Output Layer [1]. Also, there are two modalities
of ANN. These are Neuron connections, Signal flow. The two categories of neural connection architectures
are monolayer network and multilayer network [1]. The Signal flow categories are feedforward networks
and feedback networks [1]. The types of learning in ANN are Supervised learning and Unsupervised
learning [1]. There are also two stages of learning which are training and testing [1].
Learning Parameters
One important learning parameter is the learning rate. It dictates how strongly the neural weights would
vary in the weights hyperspace. It is denoted by the Greek letter η. The learning process may be and is
expected to be controlled [2].
Another important parameter is the condition for stopping. Usually, the training stops when the
general mean error is reached. However, there are cases where maximum number of iterations or epochs
is the condition for stopping. This is particularly used when the network fails to learn and there is little or
no change in the weights’ values [2].
Activation Function
Let us now look at the activation function. There are four types of activation functions [1]. These are:
• Sigmoid Logistic – Given by the equation: 𝑓(𝑥) =
1
1+𝑒−𝑥
• Hyperbolic Tangent – Given by the equation: 𝑓(𝑥) =
1−𝑒−𝑥
1+𝑒−𝑥
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
3
• Hard Limiting Threshold – Given by the equation: 𝑓(𝑥) = {0 𝑖𝑓 𝑥 < 0, 1 𝑖𝑓 𝑥 ≥ 1} Also known as
Binary Step
• Purely Linear – Given by the equation: 𝑓(𝑥) = 𝑥
It must be emphasized that for binary classification problems, a sigmoid logistic activation function can be
used [6]. Also, to predict values that are larger than 1 Sigmoid Logistic and Hyperbolic Tangent are not
suitable as the activation function.
Below is a comparison of various activation functions and their derivatives [6].
Learning Algorithms
Examples of learning algorithms in ANN are Perceptron and Adaline (Adaptive Linear Neuron). Below is a
diagram that compares Perceptron and Adaline.
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
4
Error Measurement & Cost Function
Supposed we have a set of records containing a pair of X and T variables.
Let consider developing a ANN as a mathematical function, ANN() that produces Y when feed with X.
For each x value given to the ANN it will produce a y value that when compared to the t value gives an
error e. e=y-t [1]. Note that this is a mere individual error measurement per data point [1].
We should take into account a general error measurement covering all N data pairs because we want the
network to learn all data points and the same weights must produce the data covering the entire data set.
That is the role of a cost function.
C(X,T,W)==
𝟏
𝑵
∑ [𝑨𝑵𝑵(𝒙(𝒊)) − 𝒕(𝒊)]²
𝒏=𝑵
𝒊=𝟎 [1]
The function above is the overall measurement of error between the target output and the neural output
where X are the inputs, T are the target outputs and W the weights, x(i) is the input at point i and t(i) is
the target output at point i. Th cost function should be minimized.
Previous Work
This section will discuss previous work in medical diagnosis using artificial neural network.
Diagnosing Metastatic Carcinoma Using ANN
The first research work that we want to review is about using artificial neural network in diagnosing
metastatic carcinoma in effusion cytology. The data preprocessing stage of building the ANN for this work
was categorized by first saving the training data in a CSV file using Microsoft Excel [10]. According to this
research paper there were 22 variables with 8 being categorical variables and the rest being numerical
variable [10]. With regards to the network design, this research performed heuristic search with hidden
unit range from a minimum of 2 and a maximum of 50 [10]. The number of iterations employed in this
research was at least 500 [10]. Also, the paper applied inverse test error calculations [10].
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
5
With regard to the method employed in this work, 114 cases of effusion fluid samples consisting
of 57 benign and metastatic carcinoma diagnosis in a 2-year period were used [10]. The diagnosis of
malignant effusion were as follows: metastatic adenocarcinoma (54), squamous cell carcinoma (1), and
signet ring carcinoma (1) [10]. It must the stated that in all 144 cases, detailed cytological features, image
morphometric data, densitometric data, and chromatin textural data were collected [10].
Results show that, Artificial Neural Network work excellently after adequate training [10]. With
the help of the model developed, it was possible to correctly identify all malignant cases in validation and
test samples [10]. The result for the multivariate Logistic regression (LR) was similar to the ANN model
and all cases were correctly classified [10].
ANN in Pancreatic Disease Diagnosis
The second work to be reviewed is about pancreatic disease diagnosis using artificial neural network. The
method employed in this work is conducting electronic searches reports of published cases of using ANN
for pancreatic disease diagnosis and prognosis [9]. With regards to results of this work, abstracts of 183651
citations were retrieved [9]. 11 articles were systematically reviewed, six examining pancreatitis, and 5
examining pancreatic cancer [9].
According to the research paper, the potential grade of severity of pancreatitis is difficult to
determine using clinical examination alone [9]. However, several predictive scoring scales have been
developed specifically to classify acute pancreatitis [9]. Examples of these scoring scales are Ranson Score,
Glasgow Severity Score and Balthazar Score [9].
Coronary Heart Disease (CHD) Diagnosis Using ANN
The third research paper to be reviewed is about coronary heart disease (CHD) diagnosis using ANN. This
study included 487 patients (425 males and 62 females) [8]. CHD risk factors that were analyzed include
age, gender, total cholesterol, high-density lipoprotein cholesterol, low-density lipoprotein cholesterol,
very-low-density lipoprotein cholesterol, triglycerides, cholesterol ratio, fasting plasma glucose, arterial
hypertension, diabetes mellitus, current tobacco smoking status, obesity, and a family history of CHD [8].
The results of this work show that coronary atherosclerosis was diagnosed in 327 patients (62.7%)
[8]. Also, a total of 160 (32.8%) patients had an intact coronary artery wall and no evidence of CHD [8].
Using different ANN types and a variable of input variables ( 5 to 10) lead to models with 64-94% accuracy
rate [8]. The best result (94%) was in Multilayer Perceptron (MLP) models with 2 buried layers [8].
Methodology
In this research, we develop a neural network using symptoms as inputs and disease as output. We also
train the ANN using Perceptron and Adaline Learning Algorithms. Take note that, for the Perceptron ANN
if any or some, or all of the symptoms are observed, then the diagnosis is the disease for that group of
symptoms. However, if none of the symptoms is observed then, the diagnosis is the patient does not have
the disease. Also, for the Adaline algorithms we assign the value of the output the chance of the patient
having the disease. The chance is a value between 0 and 1 with 1 being the data point when patient is
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
6
exhibiting all symptoms and 0 being a data point when patient is not exhibiting any of the symptoms.
Finally, its important to note that during training we varied the values of various learning parameters such
as the learning rate, the number of iterations or epochs and the target error in order to get a neural
network that gives the desired output and also to enable the various weights to vary or change as learning
goes on. Below are tables for the training data set for both Bipolar Disorder and Schizophrenia using the
Perceptron and Adaline learning algorithms.
Bipolar Disorder - Perceptron
Sample Symptom
1
Symptom
2
Symptom
3
Symptom
4
Symptom
5
Symptom
6
Symptom
7
Bipolar
1 0 0 0 0 0 0 0 0
2 1 0 0 0 0 0 0 1
3 0 1 0 0 0 0 0 1
4 0 0 1 0 0 0 0 1
5 0 0 0 1 0 0 0 1
6 0 0 0 0 1 0 0 1
7 0 0 0 0 0 1 0 1
8 1 1 0 0 0 0 1 1
9 1 1 1 0 0 0 0 1
10 1 1 1 1 0 0 0 1
11 1 1 1 1 1 0 0 1
12 1 1 1 1 1 1 0 1
13 1 1 1 1 1 1 1 1
Bipolar Disorder - Adaline
Sample Symptom
1
Symptom
2
Symptom
3
Symptom
4
Symptom
5
Symptom
6
Symptom
7
Bipolar
1 0 0 0 0 0 0 0 0.000
2 1 0 0 0 0 0 0 0.143
3 0 1 0 0 0 0 0 0.143
4 0 0 1 0 0 0 0 0.143
5 0 0 0 1 0 0 0 0.143
6 0 0 0 0 1 0 0 0.143
7 0 0 0 0 0 1 0 0.143
8 1 1 0 0 0 0 1 0.286
9 1 1 1 0 0 0 0 0.429
10 1 1 1 1 0 0 0 0.571
11 1 1 1 1 1 0 0 0.714
12 1 1 1 1 1 1 0 0.857
13 1 1 1 1 1 1 1 1.000
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
7
Bipolar Disorder Symptoms Description
Symptom 1 Feeling overly happy or high
Symptom 2 Having a decreased need for sleep
Symptom 3 Talking fast
Symptom 4 Feeling extremely restless or impulsive
Symptom 5 Being easily distracted
Symptom 6 Having over confidence in your abilities
Symptom 7 Engaging in risky activities
Schizophrenia - Perceptron
Sam
ple
Sympt
om 1
Sympt
om 2
Sympt
om 3
Sympt
om 4
Sympt
om 5
Sympt
om 6
Sympt
om 7
Sympt
om 8
Sympt
om 9
Schizophr
enia
1 0 0 0 0 0 0 0 0 0 0.
2 1 0 0 0 0 0 0 0 0 1
3 0 1 0 0 0 0 0 0 0 1
4 0 0 1 0 0 0 0 0 0 1
5 0 0 0 1 0 0 0 0 0 1
6 0 0 0 0 1 0 0 0 0 1
7 0 0 0 0 0 1 0 0 0 1
8 0 0 0 0 0 0 1 0 0 1
9 0 0 0 0 0 0 0 1 0 1
10 0 0 0 0 0 0 0 0 1 1
11 1 1 0 0 0 0 0 0 0 1
12 1 1 1 0 0 0 0 0 0 1
13 1 1 1 1 0 0 0 0 0 1
14 1 1 1 1 1 0 0 0 0 1
15 1 1 1 1 1 1 0 0 0 1
16 1 1 1 1 1 1 1 0 0 1
17 1 1 1 1 1 1 1 1 0 1
18 1 1 1 1 1 1 1 1 1 1
Schizophrenia – Adaline
Sam
ple
Sympt
om 1
Sympt
om 2
Sympt
om 3
Sympt
om 4
Sympt
om 5
Sympt
om 6
Sympt
om 7
Sympt
om 8
Sympt
om 9
Schizophr
enia
1 0 0 0 0 0 0 0 0 0 0.000
2 1 0 0 0 0 0 0 0 0 0.111
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
8
3 0 1 0 0 0 0 0 0 0 0.111
4 0 0 1 0 0 0 0 0 0 0.111
5 0 0 0 1 0 0 0 0 0 0.111
6 0 0 0 0 1 0 0 0 0 0.111
7 0 0 0 0 0 1 0 0 0 0.111
8 0 0 0 0 0 0 1 0 0 0.111
9 0 0 0 0 0 0 0 1 0 0.111
10 0 0 0 0 0 0 0 0 1 0.111
11 1 1 0 0 0 0 0 0 0 0.222
12 1 1 1 0 0 0 0 0 0 0.333
13 1 1 1 1 0 0 0 0 0 0.444
14 1 1 1 1 1 0 0 0 0 0.556
15 1 1 1 1 1 1 0 0 0 0.667
16 1 1 1 1 1 1 1 0 0 0.778
17 1 1 1 1 1 1 1 1 0 0.889
18 1 1 1 1 1 1 1 1 1 1.000
Schizophrenia Symptoms Description
Symptom 1 Delusions
Symptom 2 Hallucinations
Symptom 3 Disorganized thinking or speech
Symptom 4 Extremely disorganized or abnormal motor
behaviour
Symptom 5 Withdrawal from friends and family
Symptom 6 Trouble sleeping
Symptom 7 Lack of motivation
Symptom 8 Irritability or depressed mood
Symptom 9 A drop in performance in school
Results
In this project we were able to implement the Perceptron and Adaline learning algorithms. We also
implemented four activation function. These are the binary step, the linear, the sigmoid and the hyperbolic
tangent activation functions. We also trained the Perceptron algorithm for both mental health diseases
using three activation functions and their derivative functions. The three activation functions for the
Perceptron are binary step, sigmoid, and hyperbolic tangent. For the Adaline algorithm, we trained the
ANN using three activation functions and their derivative functions. These activation functions are linear,
sigmoid, and hyperbolic tangent activation functions.
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
9
From the training, we realized that high maximum iteration or epochs seems to improve the
performance of both learning algorithms. Also, low target error also helps the ANNs implemented to
predict the desired output using the ANN. Additionally a high learning rate also improves the ability of the
ANN to predict the desired output. For the Perceptron algorithm, a learning rate of 1 often leads to a
hundred percent ability to predict the desired output and a learning rate of 0.6 makes the ANN often
predicts the desired output recording a total of 9 correct prediction out of the data records of about 13
data points.
Conclusion
It is imperative to state that ANNs are effective in medical diagnosis. The results from this work show this
fact, especially for mental health disease diagnosis using symptoms. The techniques described in this
paper are one of the simplest ways of using ANN in medical diagnosis. This work can be improved by using
Multi – Layer Perceptrons (MLP) and Recurrent MLP. Other approaches such as the Backpropagation and
Levenberg Marquardt algorithms may also improve the effectiveness of this work. However, it must be
stated that these algorithms and approaches to ANN are more complex to implement and manage.
Nonetheless this research work shows some of the simplest ways of implementing ANN for
medical diagnosis, which is using a Perceptron or Adaline algorithms with an architecture that is not a
multi-layer architecture. Other data sources such as ECG, CT scans, X-rays, and speech recognition may be
employed in diagnosis using ANN.
References
1. F. M. Soares, A. M. F. Souza Neural Network Programming with Java
https://img1.wsimg.com/blobby/go/389886fb-5e50-4fa8-b2d8-
5849bb0f2b64/downloads/1ca32jha0_704519.pdf
2. F. Amato, A. Lopez, E. M. Pena-Mendez, P. Vanhara, A. Hampl, J Havel Artificial neural networks in
medical diagnosis
https://www.researchgate.net/publication/250310836_Artificial_neural_networks_in_medical_
diagnosis
3. Artificial Intelligence (AI) in Medical Diagnostics Market by Modality(CT, X-RAY, MRI, Ultrasound),
Application (IVD, Radiology, CNS, CVS, Ob/Gyn), User (Hospital, Lab), Unmet Need, Key
Stakeholders, Buying Criteria – Global Forecast https://www.marketsandmarkets.com/Market-
Reports/artificial-intelligence-medical-diagnostics-market-
22519734.html?gad_source=1&gclid=Cj0KCQiAwvKtBhDrARIsAJj-kTgP5p6mDNGEPgB-
rwe9NDVTVZzpFglIk9WqNLS40-RSp0iFYMH_0pMaAorAEALw_wcB
4. M. Banoula What is Perceptron: A Beginner Guide for Perceptron
https://www.simplilearn.com/tutorials/deep-learning-tutorial/perceptron
5. Adaline Concepts and definitions
https://gamco.es/en/glossary/adaline/#:~:text=ADALINE%20(Adaptive%20Linear%20Neuron)%2
0is,uses%20a%20linear%20activation%20function.
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
10
6. L. Panneerselvam Activation Functions and their Derivatives – A Quick and Complete Guide
https://www.analyticsvidhya.com/blog/2021/04/activation-functions-and-their-derivatives-a-
quick-complete-guide/
7. E. Alkim, E Gurbuz, E Killic A fast and adaptive automated disease diagnosis method with an
innovative neural network model
https://www.researchgate.net/publication/225048972_A_fast_and_adaptive_automated_diseas
e_diagnosis_method_with_an_innovative_neural_network_model
8. O. Y. Atkov, S. G. Gorokhova, A. G. Sboev, E. V. Generozov, E. V. Muraseyeva, S. Y. Moroshkina, N.
N. Cherniy Coronary heart disease diagnosis by artificial neural networks including genetic
polymorphisms and clinical parameters https://core.ac.uk/download/pdf/82255218.pdf
9. A Bartosch-Harlid, B Andersson, U Aho, J Nilsson, R Andersson Artificial neural network in
pancreatic disease https://academic.oup.com/bjs/article/95/7/817/6142865
10. A Barwad, P Dey, S Susheilia Artificial Neural Network in the Diagnosis of Metastatic Carcinoma in
Effusion Cytology https://onlinelibrary.wiley.com/doi/pdf/10.1002/cyto.b.20632
Appendix 1
The results below show the ability of the Perceptron Algorithm to predict the desired output with
recorded error of only 4 out of 13 data points for a learning rate of 0.6
----------PERCEPTRON PRINT RESULT----------
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:0.0 Error:0.0
1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0
1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0
1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0
1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
11
The Perceptron algorithms was also able to predict the desired output for all data points when the
learning rate is set to 1.0 with no recorded error for all data points. See data below.
----------PERCEPTRON PRINT RESULT----------
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:0.0 Error:0.0
1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0
Appendix 2
The ability of the ANN to change or vary the weights during the learning process is also affected by
the learning rate. With a learning rate of 1.0 the weights initialized seldom change but with a learning
rate of 0.6 the weights are adjusted. See results below for learning rate of 0.6.
----------PERCEPTRON INIT NET----------
## Input Layer ##
Neuron 1
Input Weights
[0.42803140701258136]
Neuron 2
Input Weights
[0.14526815544119032]
Neuron 3
Input Weights
[0.29191402444936543]
Neuron 4
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
12
Input Weights
[0.8464470955166298]
Neuron 5
Input Weights
[0.4370433539753529]
Neuron 6
Input Weights
[0.7775388689965899]
Neuron 7
Input Weights
[0.5178997101398588]
Neuron 8
Input Weights
[0.5129652149651632]
## Output Layer ##
Neuron 1
Output Weights
[0.8538385953220633]
----------PERCEPTRON TRAINED NET----------
## Input Layer ##
Neuron 1
Input Weights
[0.5900314070125785]
Neuron 2
Input Weights
[0.20526815544119065]
Neuron 3
Input Weights
[0.35191402444936437]
Neuron 4
Input Weights
[0.8464470955166298]
Neuron 5
Input Weights
[0.4682433539753523]
Neuron 6
Input Weights
[0.7775388689965899]
Neuron 7
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
13
Input Weights
[0.5286997101398586]
Neuron 8
Input Weights
[0.5129652149651632]
## Output Layer ##
Neuron 1
Output Weights
[0.8538385953220633]
Appendix 3
The data below shows the results for the Adaline algorithms using the sigmoid logistic activation function.
----------ADALINE PRINT RESULT----------
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.716735577399514 Real Output:0.0
Error:0.5137098879102147
1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.8469869594211688 Real Output:0.143
Error:0.49559763903506227
1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.881876918550977 Real Output:0.143
Error:0.5459391007673872
1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.7792107750823153 Real Output:0.143
Error:0.40476415033084034
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:0.7715204628469654 Real Output:0.143
Error:0.3950379722173636
1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.7978074707013828 Real Output:0.143
Error:0.4287728236863423
1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.8011058639544936 Real Output:0.143
Error:0.4331033281712904
1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:0.9621525065298403 Real Output:0.286
Error:0.4571822120865858
1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.9579488737370778 Real Output:0.429
Error:0.279786911027723
1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:0.96815459304034 Real Output:0.571
Error:0.15773177077303813
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
14
1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:0.9793428320994552 Real Output:0.714
Error:0.07040681854655967
1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:0.9869226975841294 Real Output:0.857
Error:0.016879907347537155
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:0.9915588563608482 Real Output:1.0
Error:7.125290593679334E-5
Appendix 4
The data below shows the results for the Adaline algorithms using the hyperbolic tangent activation
function.
----------ADALINE PRINT RESULT----------
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.4309954519907328 Real Output:0.0
Error:0.18575707963669608
1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.6705940903277582 Real Output:0.143
Error:0.2783555241487746
1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.6873322390263044 Real Output:0.143
Error:0.2962975864433897
1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.6702642472823607 Real Output:0.143
Error:0.2780075864622344
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:0.7003649415208317 Real Output:0.143
Error:0.31065567803652017
1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.7677596660937668 Real Output:0.143
Error:0.39032464037759496
1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.6775106073212074 Real Output:0.143
Error:0.28570158933888595
1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:0.9454511956462368 Real Output:0.286
Error:0.43487587943925127
1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.9127381624996793 Real Output:0.429
Error:0.23400260985856616
1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:0.9603650081910109 Real Output:0.571
Error:0.15160510960358603
1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:0.9867285824553262 Real Output:0.714
Error:0.0743808796880917
Nathanael Asaam
Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University
nataoasaam@gmail.com
15
1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:0.9935615534012175 Real Output:0.857
Error:0.018649057867353595
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:0.998030966531186 Real Output:1.0
Error:3.877092801309898E-6
Appendix 5
The results below shows the data for the Adaline algorithm using the linear activation function.
----------ADALINE PRINT RESULT----------
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:7.550711724152098 Real Output:0.0 Error:57.01324754124795
1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:15.744218397513059 Real Output:0.143
Error:243.3980154868999
1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:15.282996506409425 Real Output:0.143
Error:229.2194942140896
1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:15.747023850282424 Real Output:0.143
Error:243.4855603201827
1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:15.981052464273223 Real Output:0.143
Error:250.84390586107108
1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:15.424233841590464 Real Output:0.143
Error:233.51610772136962
1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:15.694293747033342 Real Output:0.143
Error:241.8427372065183
1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:31.30384504957859 Real Output:0.286
Error:962.106711519667
1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:31.672815305900713 Real Output:0.429
Error:976.1759948692358
1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:40.10315604602184 Real Output:0.571
Error:1562.7913616470212
1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:47.9766781634602 Real Output:0.714
Error:2233.760747182818
1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:56.12026018634145 Real Output:0.857
Error:3054.0279264232718
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:63.94760205614965 Real Output:1.0
Error:3962.4006046193754

More Related Content

Similar to An Artificial Neural Network Based Medical Diagnosis of Mental Health Diseases

A Neural Network Based Diagnostic System for Classification of Industrial Car...
A Neural Network Based Diagnostic System for Classification of Industrial Car...A Neural Network Based Diagnostic System for Classification of Industrial Car...
A Neural Network Based Diagnostic System for Classification of Industrial Car...
CSCJournals
 
Early detection of adult valve disease–mitral
Early detection of adult valve disease–mitralEarly detection of adult valve disease–mitral
Early detection of adult valve disease–mitral
IAEME Publication
 
Early detection of adult valve disease mitral stenosis using the elman artifi...
Early detection of adult valve disease mitral stenosis using the elman artifi...Early detection of adult valve disease mitral stenosis using the elman artifi...
Early detection of adult valve disease mitral stenosis using the elman artifi...
iaemedu
 
Early detection of adult valve disease mitral stenosis
Early detection of adult valve disease mitral stenosisEarly detection of adult valve disease mitral stenosis
Early detection of adult valve disease mitral stenosis
IAEME Publication
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing data
IAEME Publication
 

Similar to An Artificial Neural Network Based Medical Diagnosis of Mental Health Diseases (20)

A Neural Network Based Diagnostic System for Classification of Industrial Car...
A Neural Network Based Diagnostic System for Classification of Industrial Car...A Neural Network Based Diagnostic System for Classification of Industrial Car...
A Neural Network Based Diagnostic System for Classification of Industrial Car...
 
HEALTH PREDICTION ANALYSIS USING DATA MINING
HEALTH PREDICTION ANALYSIS USING DATA  MININGHEALTH PREDICTION ANALYSIS USING DATA  MINING
HEALTH PREDICTION ANALYSIS USING DATA MINING
 
IRJET- Techniques for Analyzing Job Satisfaction in Working Employees – A...
IRJET-  	  Techniques for Analyzing Job Satisfaction in Working Employees – A...IRJET-  	  Techniques for Analyzing Job Satisfaction in Working Employees – A...
IRJET- Techniques for Analyzing Job Satisfaction in Working Employees – A...
 
Comparing Data Mining Techniques used for Heart Disease Prediction
Comparing Data Mining Techniques used for Heart Disease PredictionComparing Data Mining Techniques used for Heart Disease Prediction
Comparing Data Mining Techniques used for Heart Disease Prediction
 
An Introduction To Artificial Intelligence And Its Applications In Biomedical...
An Introduction To Artificial Intelligence And Its Applications In Biomedical...An Introduction To Artificial Intelligence And Its Applications In Biomedical...
An Introduction To Artificial Intelligence And Its Applications In Biomedical...
 
Early detection of adult valve disease–mitral
Early detection of adult valve disease–mitralEarly detection of adult valve disease–mitral
Early detection of adult valve disease–mitral
 
Early detection of adult valve disease mitral stenosis using the elman artifi...
Early detection of adult valve disease mitral stenosis using the elman artifi...Early detection of adult valve disease mitral stenosis using the elman artifi...
Early detection of adult valve disease mitral stenosis using the elman artifi...
 
Early detection of adult valve disease mitral stenosis
Early detection of adult valve disease mitral stenosisEarly detection of adult valve disease mitral stenosis
Early detection of adult valve disease mitral stenosis
 
Spinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal CordSpinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal Cord
 
Risk Of Heart Disease Prediction Using Machine Learning
Risk Of Heart Disease Prediction Using Machine LearningRisk Of Heart Disease Prediction Using Machine Learning
Risk Of Heart Disease Prediction Using Machine Learning
 
Cao report 2007-2012
Cao report 2007-2012Cao report 2007-2012
Cao report 2007-2012
 
CI_GA_module2_ABC_updatedG.ppt .
CI_GA_module2_ABC_updatedG.ppt           .CI_GA_module2_ABC_updatedG.ppt           .
CI_GA_module2_ABC_updatedG.ppt .
 
Applications of Artificial Neural Networks in Cancer Prediction
Applications of Artificial Neural Networks in Cancer PredictionApplications of Artificial Neural Networks in Cancer Prediction
Applications of Artificial Neural Networks in Cancer Prediction
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing data
 
Disease Prediction Using Machine Learning
Disease Prediction Using Machine LearningDisease Prediction Using Machine Learning
Disease Prediction Using Machine Learning
 
IRJET- Disease Prediction using Machine Learning
IRJET-  Disease Prediction using Machine LearningIRJET-  Disease Prediction using Machine Learning
IRJET- Disease Prediction using Machine Learning
 
IRJET- Facial Expression Recognition System using Neural Network based on...
IRJET-  	  Facial Expression Recognition System using Neural Network based on...IRJET-  	  Facial Expression Recognition System using Neural Network based on...
IRJET- Facial Expression Recognition System using Neural Network based on...
 
Performance Evaluation of Neural Classifiers Through Confusion Matrices To Di...
Performance Evaluation of Neural Classifiers Through Confusion Matrices To Di...Performance Evaluation of Neural Classifiers Through Confusion Matrices To Di...
Performance Evaluation of Neural Classifiers Through Confusion Matrices To Di...
 
A04401001013
A04401001013A04401001013
A04401001013
 
IRJET- Predicting Heart Disease using Machine Learning Algorithm
IRJET- Predicting Heart Disease using Machine Learning AlgorithmIRJET- Predicting Heart Disease using Machine Learning Algorithm
IRJET- Predicting Heart Disease using Machine Learning Algorithm
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

An Artificial Neural Network Based Medical Diagnosis of Mental Health Diseases

  • 1. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 1 An Artificial Neural Network Based Medical Diagnosis of Mental Health Diseases Abstract In this research paper, we explore Artificial Neural Network (ANN) in Medical Diagnosis of Mental Health Diseases. The focus area was two mental health conditions, namely Bipolar Disorder and Schizophrenia. Additionally, we used two main ANN learning algorithms to predict the diagnosis for mental health illness based on the symptoms for the two mental health diseases we are focusing on. The two algorithms are Perceptron and Adaline. Also, we implemented the two learning algorithms and four activation functions that were used to train the ANN. The four activation functions are Binary Step, Linear, Sigmoid Logistic and Hyperbolic Tangent. We also trained the Perceptron algorithm using the binary step function, the sigmoid logistic function and the hyperbolic tangent function. For the Adaline algorithm, we used the linear activation function, the sigmoid logistic activation function and the hyperbolic tangent activation function for the training. Results from our work show that perceptron is very effective at predicting the diagnosis for the two mental health diseases, especially using the binary step activation function. Adaline algorithm was not very effective at predicting the probability of a patient having any of the two diseases, particularly using the linear activation function. It performed a little bit okay with the other two activation function implemented. However, the Perceptron algorithm implemented was able to predict if a patient has any of the two mental conditions. The output for the perceptron algorithms was a binary value with 1 indicating that patient has the disease and 0 indicating that patient does not have the disease. Introduction Artificial Neural Network is a sub-field of Artificial Intelligence (AI). This branch of AI is widely used in various branches of Arts, Science and Technology. Lately, there have been several innovations of AI in the Health sector. For instance, Amason Web Service (AWS) has introduced HealthScribe which lets Health Care Software Vendors develop applications that automatically generate clinical notes by analyzing Patient –Clinician conversations. HealthScribe uses Speech Recognition and Generative AI to achieve this. There have also been some research into using Artificial Neural Network in Medical Diagnosis. Also, ANN has been used in diagnosis of colorectal cancer, multiple sclerosis lesion, colon cancer, pancreatic disease, gynecological disease and early diabetes [2]. According to an article about AI in Medical Diagnostics, the global AI in medical diagnostic market in terms of revenue was estimated to be $ 1.3 billion in 2023 and is expected to reach $ 3.7 billion by 2028 growing at a compound annual growth rate (CAGR) of 23.2% [3]. The article also explains that companies hoping to use AI to develop medical software need a workforce with a certain skill set for developing, managing and implementing AI systems [3]. For instance, cognitive computing, machine learning, deep learning and image recognition [3]. Also integrating AI solutions into existing system needs extensive data processing for replicating human brain behaviour [3]. This paper is a research paper that seeks to investigate artificial neural network based medical diagnosis. The focus of this paper is to explore the diagnosis of mental health disease using artificial neural
  • 2. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 2 network. The motivation behind this research paper is to streamline the diagnosis process of mental health diseases and avoid misdiagnosis. Additionally, Artificial Neural Network can handle diverse kinds of medical data. The scope of the paper is two main mental health diseases namely, Bipolar Disorder and Schizophrenia. Also, with regards to medical data that will be used we will stick to symptoms captured in patient-doctor conversations. As such, this paper does not discuss anything related to speech recognition. The aim is to build a neural network that takes a number of symptoms associated with mental health disease and then uses it to predict the diagnosis for a mental health disease. Background In this section we give a concise background about Artificial Neural Network (ANN). Artificial Neural Network An ANN is a mathematical representation of the human neural architecture, reflecting its learning and generalization abilities [2]. ANN is widely used in research because it can model highly non-linear systems in which the relation among the variables is unknow or very complex [2]. The basic elements of an ANN are Artificial Neurons, Weight and Biases, activation Functions and Layers of Neurons [1]. There are three layers of neurons, namely, Input Layer, Hidden Layer and Output Layer [1]. Also, there are two modalities of ANN. These are Neuron connections, Signal flow. The two categories of neural connection architectures are monolayer network and multilayer network [1]. The Signal flow categories are feedforward networks and feedback networks [1]. The types of learning in ANN are Supervised learning and Unsupervised learning [1]. There are also two stages of learning which are training and testing [1]. Learning Parameters One important learning parameter is the learning rate. It dictates how strongly the neural weights would vary in the weights hyperspace. It is denoted by the Greek letter η. The learning process may be and is expected to be controlled [2]. Another important parameter is the condition for stopping. Usually, the training stops when the general mean error is reached. However, there are cases where maximum number of iterations or epochs is the condition for stopping. This is particularly used when the network fails to learn and there is little or no change in the weights’ values [2]. Activation Function Let us now look at the activation function. There are four types of activation functions [1]. These are: • Sigmoid Logistic – Given by the equation: 𝑓(𝑥) = 1 1+𝑒−𝑥 • Hyperbolic Tangent – Given by the equation: 𝑓(𝑥) = 1−𝑒−𝑥 1+𝑒−𝑥
  • 3. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 3 • Hard Limiting Threshold – Given by the equation: 𝑓(𝑥) = {0 𝑖𝑓 𝑥 < 0, 1 𝑖𝑓 𝑥 ≥ 1} Also known as Binary Step • Purely Linear – Given by the equation: 𝑓(𝑥) = 𝑥 It must be emphasized that for binary classification problems, a sigmoid logistic activation function can be used [6]. Also, to predict values that are larger than 1 Sigmoid Logistic and Hyperbolic Tangent are not suitable as the activation function. Below is a comparison of various activation functions and their derivatives [6]. Learning Algorithms Examples of learning algorithms in ANN are Perceptron and Adaline (Adaptive Linear Neuron). Below is a diagram that compares Perceptron and Adaline.
  • 4. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 4 Error Measurement & Cost Function Supposed we have a set of records containing a pair of X and T variables. Let consider developing a ANN as a mathematical function, ANN() that produces Y when feed with X. For each x value given to the ANN it will produce a y value that when compared to the t value gives an error e. e=y-t [1]. Note that this is a mere individual error measurement per data point [1]. We should take into account a general error measurement covering all N data pairs because we want the network to learn all data points and the same weights must produce the data covering the entire data set. That is the role of a cost function. C(X,T,W)== 𝟏 𝑵 ∑ [𝑨𝑵𝑵(𝒙(𝒊)) − 𝒕(𝒊)]² 𝒏=𝑵 𝒊=𝟎 [1] The function above is the overall measurement of error between the target output and the neural output where X are the inputs, T are the target outputs and W the weights, x(i) is the input at point i and t(i) is the target output at point i. Th cost function should be minimized. Previous Work This section will discuss previous work in medical diagnosis using artificial neural network. Diagnosing Metastatic Carcinoma Using ANN The first research work that we want to review is about using artificial neural network in diagnosing metastatic carcinoma in effusion cytology. The data preprocessing stage of building the ANN for this work was categorized by first saving the training data in a CSV file using Microsoft Excel [10]. According to this research paper there were 22 variables with 8 being categorical variables and the rest being numerical variable [10]. With regards to the network design, this research performed heuristic search with hidden unit range from a minimum of 2 and a maximum of 50 [10]. The number of iterations employed in this research was at least 500 [10]. Also, the paper applied inverse test error calculations [10].
  • 5. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 5 With regard to the method employed in this work, 114 cases of effusion fluid samples consisting of 57 benign and metastatic carcinoma diagnosis in a 2-year period were used [10]. The diagnosis of malignant effusion were as follows: metastatic adenocarcinoma (54), squamous cell carcinoma (1), and signet ring carcinoma (1) [10]. It must the stated that in all 144 cases, detailed cytological features, image morphometric data, densitometric data, and chromatin textural data were collected [10]. Results show that, Artificial Neural Network work excellently after adequate training [10]. With the help of the model developed, it was possible to correctly identify all malignant cases in validation and test samples [10]. The result for the multivariate Logistic regression (LR) was similar to the ANN model and all cases were correctly classified [10]. ANN in Pancreatic Disease Diagnosis The second work to be reviewed is about pancreatic disease diagnosis using artificial neural network. The method employed in this work is conducting electronic searches reports of published cases of using ANN for pancreatic disease diagnosis and prognosis [9]. With regards to results of this work, abstracts of 183651 citations were retrieved [9]. 11 articles were systematically reviewed, six examining pancreatitis, and 5 examining pancreatic cancer [9]. According to the research paper, the potential grade of severity of pancreatitis is difficult to determine using clinical examination alone [9]. However, several predictive scoring scales have been developed specifically to classify acute pancreatitis [9]. Examples of these scoring scales are Ranson Score, Glasgow Severity Score and Balthazar Score [9]. Coronary Heart Disease (CHD) Diagnosis Using ANN The third research paper to be reviewed is about coronary heart disease (CHD) diagnosis using ANN. This study included 487 patients (425 males and 62 females) [8]. CHD risk factors that were analyzed include age, gender, total cholesterol, high-density lipoprotein cholesterol, low-density lipoprotein cholesterol, very-low-density lipoprotein cholesterol, triglycerides, cholesterol ratio, fasting plasma glucose, arterial hypertension, diabetes mellitus, current tobacco smoking status, obesity, and a family history of CHD [8]. The results of this work show that coronary atherosclerosis was diagnosed in 327 patients (62.7%) [8]. Also, a total of 160 (32.8%) patients had an intact coronary artery wall and no evidence of CHD [8]. Using different ANN types and a variable of input variables ( 5 to 10) lead to models with 64-94% accuracy rate [8]. The best result (94%) was in Multilayer Perceptron (MLP) models with 2 buried layers [8]. Methodology In this research, we develop a neural network using symptoms as inputs and disease as output. We also train the ANN using Perceptron and Adaline Learning Algorithms. Take note that, for the Perceptron ANN if any or some, or all of the symptoms are observed, then the diagnosis is the disease for that group of symptoms. However, if none of the symptoms is observed then, the diagnosis is the patient does not have the disease. Also, for the Adaline algorithms we assign the value of the output the chance of the patient having the disease. The chance is a value between 0 and 1 with 1 being the data point when patient is
  • 6. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 6 exhibiting all symptoms and 0 being a data point when patient is not exhibiting any of the symptoms. Finally, its important to note that during training we varied the values of various learning parameters such as the learning rate, the number of iterations or epochs and the target error in order to get a neural network that gives the desired output and also to enable the various weights to vary or change as learning goes on. Below are tables for the training data set for both Bipolar Disorder and Schizophrenia using the Perceptron and Adaline learning algorithms. Bipolar Disorder - Perceptron Sample Symptom 1 Symptom 2 Symptom 3 Symptom 4 Symptom 5 Symptom 6 Symptom 7 Bipolar 1 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 1 3 0 1 0 0 0 0 0 1 4 0 0 1 0 0 0 0 1 5 0 0 0 1 0 0 0 1 6 0 0 0 0 1 0 0 1 7 0 0 0 0 0 1 0 1 8 1 1 0 0 0 0 1 1 9 1 1 1 0 0 0 0 1 10 1 1 1 1 0 0 0 1 11 1 1 1 1 1 0 0 1 12 1 1 1 1 1 1 0 1 13 1 1 1 1 1 1 1 1 Bipolar Disorder - Adaline Sample Symptom 1 Symptom 2 Symptom 3 Symptom 4 Symptom 5 Symptom 6 Symptom 7 Bipolar 1 0 0 0 0 0 0 0 0.000 2 1 0 0 0 0 0 0 0.143 3 0 1 0 0 0 0 0 0.143 4 0 0 1 0 0 0 0 0.143 5 0 0 0 1 0 0 0 0.143 6 0 0 0 0 1 0 0 0.143 7 0 0 0 0 0 1 0 0.143 8 1 1 0 0 0 0 1 0.286 9 1 1 1 0 0 0 0 0.429 10 1 1 1 1 0 0 0 0.571 11 1 1 1 1 1 0 0 0.714 12 1 1 1 1 1 1 0 0.857 13 1 1 1 1 1 1 1 1.000
  • 7. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 7 Bipolar Disorder Symptoms Description Symptom 1 Feeling overly happy or high Symptom 2 Having a decreased need for sleep Symptom 3 Talking fast Symptom 4 Feeling extremely restless or impulsive Symptom 5 Being easily distracted Symptom 6 Having over confidence in your abilities Symptom 7 Engaging in risky activities Schizophrenia - Perceptron Sam ple Sympt om 1 Sympt om 2 Sympt om 3 Sympt om 4 Sympt om 5 Sympt om 6 Sympt om 7 Sympt om 8 Sympt om 9 Schizophr enia 1 0 0 0 0 0 0 0 0 0 0. 2 1 0 0 0 0 0 0 0 0 1 3 0 1 0 0 0 0 0 0 0 1 4 0 0 1 0 0 0 0 0 0 1 5 0 0 0 1 0 0 0 0 0 1 6 0 0 0 0 1 0 0 0 0 1 7 0 0 0 0 0 1 0 0 0 1 8 0 0 0 0 0 0 1 0 0 1 9 0 0 0 0 0 0 0 1 0 1 10 0 0 0 0 0 0 0 0 1 1 11 1 1 0 0 0 0 0 0 0 1 12 1 1 1 0 0 0 0 0 0 1 13 1 1 1 1 0 0 0 0 0 1 14 1 1 1 1 1 0 0 0 0 1 15 1 1 1 1 1 1 0 0 0 1 16 1 1 1 1 1 1 1 0 0 1 17 1 1 1 1 1 1 1 1 0 1 18 1 1 1 1 1 1 1 1 1 1 Schizophrenia – Adaline Sam ple Sympt om 1 Sympt om 2 Sympt om 3 Sympt om 4 Sympt om 5 Sympt om 6 Sympt om 7 Sympt om 8 Sympt om 9 Schizophr enia 1 0 0 0 0 0 0 0 0 0 0.000 2 1 0 0 0 0 0 0 0 0 0.111
  • 8. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 8 3 0 1 0 0 0 0 0 0 0 0.111 4 0 0 1 0 0 0 0 0 0 0.111 5 0 0 0 1 0 0 0 0 0 0.111 6 0 0 0 0 1 0 0 0 0 0.111 7 0 0 0 0 0 1 0 0 0 0.111 8 0 0 0 0 0 0 1 0 0 0.111 9 0 0 0 0 0 0 0 1 0 0.111 10 0 0 0 0 0 0 0 0 1 0.111 11 1 1 0 0 0 0 0 0 0 0.222 12 1 1 1 0 0 0 0 0 0 0.333 13 1 1 1 1 0 0 0 0 0 0.444 14 1 1 1 1 1 0 0 0 0 0.556 15 1 1 1 1 1 1 0 0 0 0.667 16 1 1 1 1 1 1 1 0 0 0.778 17 1 1 1 1 1 1 1 1 0 0.889 18 1 1 1 1 1 1 1 1 1 1.000 Schizophrenia Symptoms Description Symptom 1 Delusions Symptom 2 Hallucinations Symptom 3 Disorganized thinking or speech Symptom 4 Extremely disorganized or abnormal motor behaviour Symptom 5 Withdrawal from friends and family Symptom 6 Trouble sleeping Symptom 7 Lack of motivation Symptom 8 Irritability or depressed mood Symptom 9 A drop in performance in school Results In this project we were able to implement the Perceptron and Adaline learning algorithms. We also implemented four activation function. These are the binary step, the linear, the sigmoid and the hyperbolic tangent activation functions. We also trained the Perceptron algorithm for both mental health diseases using three activation functions and their derivative functions. The three activation functions for the Perceptron are binary step, sigmoid, and hyperbolic tangent. For the Adaline algorithm, we trained the ANN using three activation functions and their derivative functions. These activation functions are linear, sigmoid, and hyperbolic tangent activation functions.
  • 9. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 9 From the training, we realized that high maximum iteration or epochs seems to improve the performance of both learning algorithms. Also, low target error also helps the ANNs implemented to predict the desired output using the ANN. Additionally a high learning rate also improves the ability of the ANN to predict the desired output. For the Perceptron algorithm, a learning rate of 1 often leads to a hundred percent ability to predict the desired output and a learning rate of 0.6 makes the ANN often predicts the desired output recording a total of 9 correct prediction out of the data records of about 13 data points. Conclusion It is imperative to state that ANNs are effective in medical diagnosis. The results from this work show this fact, especially for mental health disease diagnosis using symptoms. The techniques described in this paper are one of the simplest ways of using ANN in medical diagnosis. This work can be improved by using Multi – Layer Perceptrons (MLP) and Recurrent MLP. Other approaches such as the Backpropagation and Levenberg Marquardt algorithms may also improve the effectiveness of this work. However, it must be stated that these algorithms and approaches to ANN are more complex to implement and manage. Nonetheless this research work shows some of the simplest ways of implementing ANN for medical diagnosis, which is using a Perceptron or Adaline algorithms with an architecture that is not a multi-layer architecture. Other data sources such as ECG, CT scans, X-rays, and speech recognition may be employed in diagnosis using ANN. References 1. F. M. Soares, A. M. F. Souza Neural Network Programming with Java https://img1.wsimg.com/blobby/go/389886fb-5e50-4fa8-b2d8- 5849bb0f2b64/downloads/1ca32jha0_704519.pdf 2. F. Amato, A. Lopez, E. M. Pena-Mendez, P. Vanhara, A. Hampl, J Havel Artificial neural networks in medical diagnosis https://www.researchgate.net/publication/250310836_Artificial_neural_networks_in_medical_ diagnosis 3. Artificial Intelligence (AI) in Medical Diagnostics Market by Modality(CT, X-RAY, MRI, Ultrasound), Application (IVD, Radiology, CNS, CVS, Ob/Gyn), User (Hospital, Lab), Unmet Need, Key Stakeholders, Buying Criteria – Global Forecast https://www.marketsandmarkets.com/Market- Reports/artificial-intelligence-medical-diagnostics-market- 22519734.html?gad_source=1&gclid=Cj0KCQiAwvKtBhDrARIsAJj-kTgP5p6mDNGEPgB- rwe9NDVTVZzpFglIk9WqNLS40-RSp0iFYMH_0pMaAorAEALw_wcB 4. M. Banoula What is Perceptron: A Beginner Guide for Perceptron https://www.simplilearn.com/tutorials/deep-learning-tutorial/perceptron 5. Adaline Concepts and definitions https://gamco.es/en/glossary/adaline/#:~:text=ADALINE%20(Adaptive%20Linear%20Neuron)%2 0is,uses%20a%20linear%20activation%20function.
  • 10. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 10 6. L. Panneerselvam Activation Functions and their Derivatives – A Quick and Complete Guide https://www.analyticsvidhya.com/blog/2021/04/activation-functions-and-their-derivatives-a- quick-complete-guide/ 7. E. Alkim, E Gurbuz, E Killic A fast and adaptive automated disease diagnosis method with an innovative neural network model https://www.researchgate.net/publication/225048972_A_fast_and_adaptive_automated_diseas e_diagnosis_method_with_an_innovative_neural_network_model 8. O. Y. Atkov, S. G. Gorokhova, A. G. Sboev, E. V. Generozov, E. V. Muraseyeva, S. Y. Moroshkina, N. N. Cherniy Coronary heart disease diagnosis by artificial neural networks including genetic polymorphisms and clinical parameters https://core.ac.uk/download/pdf/82255218.pdf 9. A Bartosch-Harlid, B Andersson, U Aho, J Nilsson, R Andersson Artificial neural network in pancreatic disease https://academic.oup.com/bjs/article/95/7/817/6142865 10. A Barwad, P Dey, S Susheilia Artificial Neural Network in the Diagnosis of Metastatic Carcinoma in Effusion Cytology https://onlinelibrary.wiley.com/doi/pdf/10.1002/cyto.b.20632 Appendix 1 The results below show the ability of the Perceptron Algorithm to predict the desired output with recorded error of only 4 out of 13 data points for a learning rate of 0.6 ----------PERCEPTRON PRINT RESULT---------- 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:0.0 Error:0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.0 Real Output:1.0 Error:1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0
  • 11. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 11 The Perceptron algorithms was also able to predict the desired output for all data points when the learning rate is set to 1.0 with no recorded error for all data points. See data below. ----------PERCEPTRON PRINT RESULT---------- 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.0 Real Output:0.0 Error:0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:1.0 Real Output:1.0 Error:0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:1.0 Real Output:1.0 Error:0.0 Appendix 2 The ability of the ANN to change or vary the weights during the learning process is also affected by the learning rate. With a learning rate of 1.0 the weights initialized seldom change but with a learning rate of 0.6 the weights are adjusted. See results below for learning rate of 0.6. ----------PERCEPTRON INIT NET---------- ## Input Layer ## Neuron 1 Input Weights [0.42803140701258136] Neuron 2 Input Weights [0.14526815544119032] Neuron 3 Input Weights [0.29191402444936543] Neuron 4
  • 12. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 12 Input Weights [0.8464470955166298] Neuron 5 Input Weights [0.4370433539753529] Neuron 6 Input Weights [0.7775388689965899] Neuron 7 Input Weights [0.5178997101398588] Neuron 8 Input Weights [0.5129652149651632] ## Output Layer ## Neuron 1 Output Weights [0.8538385953220633] ----------PERCEPTRON TRAINED NET---------- ## Input Layer ## Neuron 1 Input Weights [0.5900314070125785] Neuron 2 Input Weights [0.20526815544119065] Neuron 3 Input Weights [0.35191402444936437] Neuron 4 Input Weights [0.8464470955166298] Neuron 5 Input Weights [0.4682433539753523] Neuron 6 Input Weights [0.7775388689965899] Neuron 7
  • 13. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 13 Input Weights [0.5286997101398586] Neuron 8 Input Weights [0.5129652149651632] ## Output Layer ## Neuron 1 Output Weights [0.8538385953220633] Appendix 3 The data below shows the results for the Adaline algorithms using the sigmoid logistic activation function. ----------ADALINE PRINT RESULT---------- 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.716735577399514 Real Output:0.0 Error:0.5137098879102147 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.8469869594211688 Real Output:0.143 Error:0.49559763903506227 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.881876918550977 Real Output:0.143 Error:0.5459391007673872 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.7792107750823153 Real Output:0.143 Error:0.40476415033084034 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:0.7715204628469654 Real Output:0.143 Error:0.3950379722173636 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.7978074707013828 Real Output:0.143 Error:0.4287728236863423 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.8011058639544936 Real Output:0.143 Error:0.4331033281712904 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:0.9621525065298403 Real Output:0.286 Error:0.4571822120865858 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.9579488737370778 Real Output:0.429 Error:0.279786911027723 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:0.96815459304034 Real Output:0.571 Error:0.15773177077303813
  • 14. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 14 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:0.9793428320994552 Real Output:0.714 Error:0.07040681854655967 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:0.9869226975841294 Real Output:0.857 Error:0.016879907347537155 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:0.9915588563608482 Real Output:1.0 Error:7.125290593679334E-5 Appendix 4 The data below shows the results for the Adaline algorithms using the hyperbolic tangent activation function. ----------ADALINE PRINT RESULT---------- 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.4309954519907328 Real Output:0.0 Error:0.18575707963669608 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.6705940903277582 Real Output:0.143 Error:0.2783555241487746 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:0.6873322390263044 Real Output:0.143 Error:0.2962975864433897 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.6702642472823607 Real Output:0.143 Error:0.2780075864622344 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:0.7003649415208317 Real Output:0.143 Error:0.31065567803652017 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:0.7677596660937668 Real Output:0.143 Error:0.39032464037759496 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:0.6775106073212074 Real Output:0.143 Error:0.28570158933888595 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:0.9454511956462368 Real Output:0.286 Error:0.43487587943925127 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:0.9127381624996793 Real Output:0.429 Error:0.23400260985856616 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:0.9603650081910109 Real Output:0.571 Error:0.15160510960358603 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:0.9867285824553262 Real Output:0.714 Error:0.0743808796880917
  • 15. Nathanael Asaam Founder and CEO @ Equicksales Consulting Ltd | Application Support Officer @ Ashesi University nataoasaam@gmail.com 15 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:0.9935615534012175 Real Output:0.857 Error:0.018649057867353595 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:0.998030966531186 Real Output:1.0 Error:3.877092801309898E-6 Appendix 5 The results below shows the data for the Adaline algorithm using the linear activation function. ----------ADALINE PRINT RESULT---------- 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:7.550711724152098 Real Output:0.0 Error:57.01324754124795 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 Net Output:15.744218397513059 Real Output:0.143 Error:243.3980154868999 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 Net Output:15.282996506409425 Real Output:0.143 Error:229.2194942140896 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 Net Output:15.747023850282424 Real Output:0.143 Error:243.4855603201827 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 Net Output:15.981052464273223 Real Output:0.143 Error:250.84390586107108 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 Net Output:15.424233841590464 Real Output:0.143 Error:233.51610772136962 1.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 Net Output:15.694293747033342 Real Output:0.143 Error:241.8427372065183 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 Net Output:31.30384504957859 Real Output:0.286 Error:962.106711519667 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 Net Output:31.672815305900713 Real Output:0.429 Error:976.1759948692358 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 Net Output:40.10315604602184 Real Output:0.571 Error:1562.7913616470212 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 Net Output:47.9766781634602 Real Output:0.714 Error:2233.760747182818 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 Net Output:56.12026018634145 Real Output:0.857 Error:3054.0279264232718 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Net Output:63.94760205614965 Real Output:1.0 Error:3962.4006046193754