You are on page 1of 4

The 7th IEEE International Conference on E-Health and Bioengineering - EHB 2019

Grigore T. Popa University of Medicine and Pharmacy, Iasi, Romania, November 21-23, 2019

Choosing Between Artificial Neural Networks and


Bayesian Inference in Stroke Risk Prediction
Adriana Albu1, Loredana Stanciu1, Mădălina-Sofia Pașca2,3, Cristian-Grigore Zimbru1
1 Automation and Applied Informatics Department, Politehnica University Timisoara, Timisoara, Romania,
adriana.albu@aut.upt.ro, loredana.stanciu@aut.upt.ro, cristian.zimbru@aut.upt.ro
2 Mathematics Department, Politehnica University Timisoara, Romania, madalina.pasca@upt.ro
3 West University Timisoara, Romania, madalina.pasca79@e-uvt.ro

Abstract — Artificial intelligence (AI) provides a multitude of section of this paper. The research described by the current paper
mechanisms that can be used to implement medical predictions starts from an application previously developed for cerebrovas-
systems. Even if this subject has been intensively debated during cular accident (also called stroke) risk prediction [2]. This appli-
the last decades, choosing the most suitable mechanism is still a cation was initially implemented using ANNs only. In the cur-
challenge. The research described in this paper focuses on stroke rent work it is implemented again, in an optimized manner and
risk prediction and offers a tool meant to assist physicians in their it is briefly described in the third section of this paper. The same
decisions. Two consecrated methods are implemented (artificial issue is solved using NBC and the solution is presented in the
neural networks and naive Bayesian classifier), and a comparison fourth section. Details about the dataset that has been used are
between them is provided. The results show that these methods
provided in the section five. The sixth section underlines the re-
have similar performances and can offer a valuable support for
sults, while the seventh one draws the conclusions.
medical predictions.
II. RELATED WORK
Keywords — artificial intelligence, artificial neural networks,
Bayesian classifier, stroke. There are numerous papers that analyze the performances of
ANNs and NBC, either used in parallel, for the same purpose, or
I. INTRODUCTION combined into a single entity, which makes use of the ad-
Stroke is a serious cause for long-term disability or death. vantages provided by both methods. It is worth to mention sev-
For this reason, the development of automated tools that can pro- eral results, even if some of these papers have been written more
vide predictions regarding vascular events is fully justified. The than twenty years ago. Actually, this demonstrates a long-stand-
aim of these tools is to support physicians, by detecting or pre- ing concern for this subject.
dicting a medical condition. This way, a serious disease can be As stated in [1], the comparison between ANNs and NBC
efficiently treated or even avoided. has been debated for a long time. For example, in [3], the authors
There are several risk factors connected to stroke, but it is obtained similar performances for these two classifiers. Another
difficult to determine what influence they have on vascular dis- study ([4]) showed that ANN is a better identifier, but NBC was
eases. An automated system that is using AI techniques could be not far away. In the experiment presented in [5] naive Bayesian
able to identify high-risk patients. The present paper describes classifier outperforms ANNs model. The comparison made in
such a system that, analyzing the features of a patient, is able to [6] demonstrated that NBC is the best choice (against the deci-
make predictions regarding the risk of a stroke, including the pa- sion trees and neural networks) for that particular task. More re-
tient in one of the four risk categories. cently, the researchers concluded in [7] that ANNs had excellent
results, while NBC requires further investigations.
The aim of this research is to validate some previous results
published by the same authors in [1]. The main idea is to provide There are researchers that have used these two classifiers to-
arguments for choosing between Artificial Neural Networks gether. For instance, in [8], the posterior probabilities provided
(ANN) and Naive Bayesian Classifier (NBC) when a medical by NBC model are trained with an ANN for the final prediction.
prediction system is developed. The system described in [1] was Brest cancer is detected in [9] using Bayes algorithm for proba-
implemented to make suggestions regarding the evolution of pa- bility of identification and neural networks for classification.
tients infected with Hepatitis B virus. The research presented in Another example is provided by [10], where an ANN is used for
the current paper focuses on the stroke risk predictions and im- predictions and a discrete Bayes network for interpretation.
plements the same mechanisms (NBC and ANNs), trying to Stroke is also a subject of interest for expert systems meant
draw some conclusions regarding the most suitable method for to assist medical decision-making. An elaborated analysis is pro-
this type of applications. vided in [11], where ANNs and logistic regression models are
The comparison between these two classifiers is still a chal- developed to predict the mortality after stroke. The authors
lenge for researchers. This aspect is emphasized in the second prove that the ANNs model is superior.

978-1-7281-2603-6/19/$31.00 ©2019 IEEE


Therefore, in the last several decades, the tools based on AI probabilities, which implements probabilistic reasoning [14] and
methods have become more and more popular for the research- which can be successfully used to make predictions. When ap-
ers who are involved in the medical field. Nevertheless, it looks plied in medical diagnosis, its general form [12] can be written
that there is still enough room for further developments and as in (1), where Dk is the cause (the possible diagnosis, this case,
opinions. the possible risk category of stroke) and S is the effect (the symp-
toms or the features of a patient).
III. ARTIFICIAL NEURAL NETWORKS
( )⋅∏ ( | )
The work in Machine Learning domain started several dec- ( | )= (1)
ades ago with ANNs. Nowadays, these are still among the most ∑ ( )⋅∏ ( | )
popular and efficient forms of learning systems [12], classifica- The value m from (1) represents the number of risk catego-
tions using conventional neural networks being able to produce ries, n is the number of features, and σi is a feature. This formula
adequate detections and predictions. determines, for a patient characterized by a set of features S, the
probability of each one of the four stroke risks Dk (therefore, k =
An ANN is a model that reproduce, in a simplified way, the
1…4). The elements from (1) can be calculated using equations
architecture of the human brain. It is made by artificial neurons
(2), (3), and (4):
which, using different activation functions, try to simulate the
chemical behavior of living creatures' neurons. ANNs acquire,
store and use knowledge, developing the ability to make deci- ( )= (2)
Ω
sions by learning from ordinary experience, as humans do [13]. ( , )
Using the processing power of modern technology, they are able ( | )= (3)
( )
to execute parallel distributed computations, to tolerate noisy in- ∩
puts, to learn new associations, new patterns and new functional ( , )= (4)
dependencies [12, 13]. All these features make them suitable for Ω
applications meant to support medical decision-making [1]. where Ω represents the number of records from the database.
Therefore, p(Dk) is the ratio between the number of patients that
In this work, ANNs have been used to classify a patient in have the risk Dk and the total number of patients, and p(σi, Dk)
one of the four possible risk categories of stroke. A function fit- is the number of patients that simultaneously have the risk Dk
ting neural network (a specialized version of feedforward net- and the feature σi, divided by the total number of patients.
work), with one hidden layer has been created and trained.
Bayes’ theorem assumes some constraints [1] that have to be
There are 11 features that are analyzed for a patient with analyzed each time it is used into a system like this:
vascular problems. The ANN is using these features as inputs.
⎯ the risk categories have to be mutually exclusive (only one
Then follows the hidden layer of the network. The number for each patient) – it is obvious that a patient cannot belong
of neurons from this layer is usually empirically established, be- to more than one risk category at a moment;
cause, as stated in [13], the decision regarding this number ⎯ the features have to be conditional independent, given a risk
doesn’t have a conclusive solution appropriate for any task. The category Dk – this constraint is not always satisfied (for in-
current application has 10 neurons on this layer. stance, it is difficult to demonstrate that cholesterol do not
The result is produced by the output layer, which contains a influence EKG), but, according to relevant researchers [12],
single neuron. It generates a number, representing the risk cate- NBC works proper and offers surprisingly good results,
gory: 1 indicates the lowest risk of stroke and 4 the highest one. even with inputs that are not conditional independent.
Each neuron of the network is firing according to an activa- V. DATASET
tion function, which internally analyzes the weighted inputs. The The quality of the results provided by a classification model
hyperbolic tangent sigmoid activation function has been used for is strongly connected to the database that is analyzed. Both al-
the neurons that belong to the hidden layer, while the output neu- gorithms implemented within this system are using the same
ron has a linear activation function. data. There are 108 records containing anonymized information
There are several algorithms that can be used for the training about patients with vascular problems. All this data has been col-
process. According to the environment’s documentation, the Le- lected from Municipal Clinical Emergency Hospital of
venberg-Marquardt backpropagation algorithm is the most suit- Timisoara, during 2015-2016 [2].
able for this type of problems, being also the fastest. The datasets used in statistics and machine learning should
The initial values of the inputs' weights of each neuron influ- accomplish some requirements in order to avoid two types of
ences the performance of the ANN. But there is no rule that spec- limitations. On the one hand, the system could be unable to
ifies which should be the proper values. For this reason, the cur- learn, having poor predictive performance, if there are very few
rent system created and trained 1000 ANNs. The most accurate records available. On the other hand, too many features, some of
of them has been saved and further used to make predictions. them irrelevant, can lead to overfitting, the system being unable
to generalize, because it learns exactly the characteristics of a
IV. BAYESIAN INFERENCE particular set of data.
Statistics remains the best tool for analyzing data and for as- Therefore, the design and the content of the database are sig-
sisting decision-making activity [1]. In this field, one of the most nificant elements that increase the performances of a medical
popular methods is Bayes’ theorem – a formula with conditional prediction system. Table I presents the features that have been
TABLE I. PATIENT'S FEATURES VI. RESULTS AND DISCUSSION
range [9 - 91] The prediction system has a graphical user interface (Fig. 1)
Age (years) that includes, in the same window, both implemented methods.
mean 47.08
male 57 This way, their results can be compared easier. In the left side of
Gender
female 51 the interface the user introduces the features of a new patient (or
Dyslipidemia range [70 - 169] uploads them from an external file). The other two panels of the
(high cholesterol) mean 112.77 interface are dedicated to NBC and ANN.
range [50 - 153]
Abdominal Circumference
mean 91.79 Both methods provide predictions regarding each risk cate-
HLV on Echocardiogram range [57 - 155] gory when the button "Calculate" is pressed. The accuracy is
(Hypertrophic Left Ventricle) mean 101.69 also displayed if the button "Test" is used. As can be observed
HLV EKG Sokolov-Lyon range [2 - 66] in Fig. 1, for the considered dataset, both methods have the same
(Hypertrophic Left Ventricle) mean 33.92
accuracy: 88.89%.
GFR (Glomerular Filtration range [12 - 60]
Rate) mean 35.15 The Bayesian inference offers as results probabilities. There-
LV (Left Ventricle) Wall range [0.1 - 1.3] fore, each risk category has associated a number in the range
Thickness mean 0.64
[0...1]. The sum of the probabilities of the four risk categories
range [115 - 334]
Postprandial Glycaemia
mean 197.22 should be 1.
range [70 - 194] The ANN provides a definite classification. A single risk cat-
A Jeun Glycaemia
mean 117.46
egory will have the value 1, the rest of them being 0. An addi-
none 47
angina 29
tional button (Train) is available in this panel, but not for regular
myocardial infarction users; the network has already been trained.
Previous Condition 20
(heart attack)
coronary revasculari-
A probability is a valuable information, because this way, the
zation
12 human expert who is using the system can evaluate the medical
1 - the lowest risk 40 status of the patient. For instance, it could be a relevant differ-
2 27 ence, from a medical point of view, between a risk prediction of
Risk
3 16 0.95 and one of 0.55 provided by the NBC. The ANN will say,
4 - the highest risk 25 in both cases, that the prediction is 1.
considered, together with some statistical elements (range of Regarding the performances of this system, there are several
their values, mean, number of records with a particular value). metrics that can be used to evaluate it. The graphical interface
The risk of stroke (which is the ground truth regarding the pre- displays the accuracy only, but few others are available. Even if
diction) is also stored into the database. the accuracy is the most popular evaluation method, it is not al-
ways the best one. A model can be highly accurate in testing
All these features are used by both classification algorithms.
phase, especially if the dataset has a dominant category (it is not
ANN takes them as they are. NBC needs them processed, be-
the case of this dataset, where the risk categories are well-bal-
cause it requires binary data; therefore, some of these fields have
anced, as can be seen at the end of Table I). But, when the model
been split in two, three, and even four ranges.
is used for real predictions, it could provide incorrect results for
The dataset has been divided in two parts, required for such particular cases. This is the so-called accuracy paradox, and for
a system. From the 108 available records, 81 have been used for this reason some other metrics should be used in parallel to eval-
training and 27 have been reserved for testing. uate the performances of a predictive system.

Fig. 1 Graphical user interface


In order to calculate these classification metrics, the confu- cess. This technique would increase the quality of the predic-
sion matrix was created. It contains information about the pre- tions for real cases. Another idea [11] is to offer predictions not
dicted risk, with respect to the ground truth value. The definition only for a close moment, but also about what will be the medical
of the confusion matrix and the values resulted in the testing status of the patient after a larger interval of time.
phase for each classifier are presented in Table II.
Therefore, there are still many relevant things to do in this
This system provides a result (the risk category) that belongs field. The general purpose of this type of models is to provide
to one of the four possible classes (unlike a regular classification, tools that are valuable aid for physicians. It is important to say
which consists in two classes: positive and negative). Therefore, that all these are certainly not meant to replace human experts,
the meaning of the elements that compose the confusion matrix, but to assist them with a second opinion.
for this particular case, is the following:
ACKNOWLEDGMENT
⎯ TP – true positive: the prediction is correct;
This work was supported by the CNFIS-FDI-2019-0696 pro-
⎯ TN – true negative: doesn't exist; this system will never say
ject of the Politehnica University Timisoara, Romania.
that there is no risk (risk = 0 is an impossible output);
⎯ FP – false positive: the prediction is greater than the real REFERENCES
value; [1] A. Albu, M.-S. Pasca, C.-G. Zimbru, "Medical Predictions: Naive Bayes
⎯ FN – false negative: the prediction is less than the real value. Classifier vs Artificial Neural Networks", The 13th IEEE International
Symposium on Applied Computational Intelligence and Informatics
Using these elements, the classification metrics sensitivity (SACI), Timisoara, Romania, 2019, pp. 1-4
and precision can be found. Their description and the obtained [2] I. Tanasoiu, A. Albu, "A Connectionist Model for Cerebrovascular
values are provided in Table III. Accident Risk Prediction", The 6th IEEE International Conference on E-
Health and Bioengineering (EHB), Sinaia, Romania, 2017, pp. 45-48
There are two other metrics, specificity and negative predic-
[3] H. Guterman, Y. Nehmadi, A. Chistyakov, J. F. Soustiel, M. Feinsod, “A
tion value, but these cannot be evaluated because the system comparison of neural network and Bayes recognition approaches in the
doesn't provide true negative results. Instead, the F1 score (har- evaluation of the brainstem trigeminal evoked potentials in multiple
monic mean between recall and precision: 2 x Precision x Recall sclerosis”, International Journal of Bio-Medical Computing, 43 (3), 1996,
/ (Precision + Recall)) can be calculated. The resulted value is pp. 203-213
0.94 for each method, which demonstrate a sort of balance be- [4] J. X. Chen, Y. W. Xing, G. C. Xi, J. Chen, j. Q. Yi, D. B. Zhao, J. Wang,
tween precision and sensitivity. “A comparison of four data mining models: Bayes, neural network, SVM
and decision trees in identifying syndromes in coronary heart disease”,
Advances in Neural Networks - ISNN 2007, 4th International Symposium
VII. CONCLUSIONS on Neural Networks, 4491, Nanjing, China, 2007, pp. 1274-1279
This research aimed to compare two AI models, NBC and [5] M.S. Islam, S. M. Khaled, K. Farhan, M. A. Rahman, J. Rahman, J,
ANN, in order to consolidate some previous results and to “Modeling spammer behavior: Naive Bayes vs. Artificial Neural
choose the most suitable one for stroke risk prediction. A defi- Networks”, International Conference on Information and Multimedia
Technology, South Korea, 2009, pp. 52-55
nite conclusion cannot be drawn, the two models having similar
[6] D. Xhemali, C. J. Hinde, R. G. Stone, “Naïve Bayes vs. Decision Trees
performances. NBC doesn't provide any FP value, while ANN vs. Neural Networks in the classification of training web pages”,
doesn't have any FN value. ANN is better than NBC regarding International Journal of Computer Science Issues, 4 (1), 2009, pp. 16-23
the sensitivity of the model, but NBC outperforms ANN in pre- [7] L. M. Rodrigues, M. Mestria, “Classification methods based on Bayes and
cision. Neural Networks for human activity recognition”, 12th International
Conference on Natural Computation, Fuzzy Systems and Knowledge,
The modest number of records that are available is an im- China, 2016, pp. 1141-1146
pediment. Both statistics and machine learning need a relevant [8] B. J. He, S.M. Mortuza, Y. T. Wang, H. B. Shen, Y. Zhang, "NeBcon:
dataset in order to model the desired behavior. protein contact map prediction using neural network training coupled with
naiive Bayes classifiers", Bioinformatics, 33 (15), 2017, pp. 2296-2306
There are some ideas that can be further implemented. For [9] E. Udayakumar, S. Santhi, P. Vetrivelan, “An investigation of Bayes
instance, an intensive training could be performed (if much more algorithm and neural networks for identifying the breast cancer”, Indian
records would be available) and the performance metrics could Journal of Medical and Paediatric Oncology, 38 (3), 2017, pp. 340-344
be evaluated with respect to each category, not to the entire pro- [10] T. P. Burghardt, K. Ajtai, "Neural/Bayes network predictor for inheritable
cardiac disease pathogenicity and phenotype", Journal of Molecular and
TABLE II. CONFUSION MATRIX Cellular Cardiology, 119, 2018, pp. 19-27
[11] S. Lukić, Ž. Ćojbasić, Z. Perić, Z. Milošević, M. Spasić, V. Pavlović, A.
Method Milojević, "Artificial neural networks based early clinical prediction of
Definition NBC ANN
(predicted class) mortality after spontaneous intracerebral hemorrhage", Acta Neurologica
Real TP FN 24 3 24 0 Belgica, 112(4), 2012, pp. 375-382
(actual class) FP TN 0 0 3 0 [12] S. Russell, P. Norvig, Artificial Intelligence: A Modern Approach, third
TABLE III. EVALUATION METRICS ed., Pearson Education, Inc., Publishing as Prentice Hall, United States,
2010, ISBN 978-0-13-207148-2
Value for Value for [13] J. M. Zurada, Introduction to Artificial Neural Systems, Jaico Publishing
Name Formula
NBC ANN House, 2012, ISBN 978-8172246501
Sensitivity (recall) TP/(TP+FN) 0.89 1
[14] A. Albu, L. Stanciu, “Benefits of using artificial intelligence in medical
Precision (correctness in predictions”, The 5-th IEEE International Conference on E-Health and
TP/(TP+FP) 1 0.89
positive prediction) Bioengineering, Iasi, Romania, 2015

You might also like