Prediction of Heart Disease Using Decision Tree in Comparison with
Particle Swarm Optimization to Improve Accuracy
Ina Maryani, Rousyati, Indriyanti, Dany Pratmanto, Yustina Meisella Kristania and Mawadatul
Maulidah
Universitas Bina Sarana Informatika, Jakarta, Indonesia
yustina.yms@bsi.ac.id, mawadatul.mwm@bsi.ac.id
Keywords:
Prediction of Heart Disease, Decision Tree, Improve Accuracy.
Abstract:
Heart disease is the leading cause of death worldwide. This disease can be prevented or treated easily if de-
tected early. However, many people do not know the symptoms of heart disease, which results in delays in the
treatment process. This disease can be caused by both modifiable and irreversible factors. This study aims to
predict heart disease using the Naive Bayes and Decision Tree algorithms with and without the Particle Swarm
Optimization (PSO) feature to predict heart disease. The results showed that the Decision Tree algorithm with
the PSO feature provided the highest accuracy when predicting heart disease, with a value of 85.84%, 87.05%
precision, 87.05% recall and an AUC value of 0.854. Whereas other algorithms such as Naive Bayes with PSO
only provide an accuracy value of 85.73% and Decision Tree without PSO has an accuracy value of 83.23%,
Naive Bayes without PSO has an accuracy value of 85.51%. Based on these results it can be concluded that a
Decision Tree with PSO features is a more effective method for classifying heart disease compared to a Deci-
sion Tree without PSO, Naive Bayes without PSO and Naive Bayes with PSO. Therefore, it can be concluded
that the Decision Tree algorithm with the PSO feature is the right choice for predicting heart disease.
1 INTRODUCTION
The heart plays an important role as a vital organ in
the human body to help support all the body’s tissues
in its work to process blood flow (Rusdiana et al.,
2019). Heart disease is a frightening disease because
it is a high cause of death, at least there are two in-
fluencing factors as stated by (Karyatin, 2019) that
the first factor is a factor that cannot be changed such
as age, gender, hypertension, smoking, cholesterol,
etc. While the second factor is a factor that can be
changed, namely lifestyle patterns. When viewed as
a whole, in general currently heart disease is the main
cause in cases of death found. There were at least
17.9 million people who died from this disease in
2019, this number represents 32% of global mortal-
ity data. Of these deaths, 85% are due to heart at-
tacks and strokes. Deaths from heart disease mostly
occur in countries with low and middle income or de-
veloping countries (WHO, 2021). According to re-
search sources conducted in 2018, Indonesia has ex-
perienced a shift in the order of the number of peo-
ple with heart disease from the previous 10th in 1908,
in 1986 to 8th while in causes of death, Indonesia
is third (Ardiansyah et al., 2018). In 2018 Riskes-
das showed the prevalence of heart disease based
on doctors’ diagnoses in Indonesia was shown at
1.5%. Provinces with the highest prevalence sequence
were North Kalimantan 2.2%, DIY 2%, Gorontalo
2%, further eight provinces had a higher prevalence
compared to the national prevalence, namely Aceh
(1.6%), Sumatra West (1.6%), DKI Jakarta (1.9%),
West Java (1.6%), Central Java (1.6%), East Kaliman-
tan (1.9%), North Sulawesi (1.8%) and Central Su-
lawesi (1.9%) (Kemenkes., 2019).
In fact, this disease that is found in the heart can
be seen from the start, however, because many people
have not received sufficient knowledge and knowl-
edge about the risks of heart disease, this has in-
creasingly caused many people to find out that they
have heart disease too late so that the process of han-
dling and healing it it will also require more time and
money and of course this will become increasingly
difficult. Early detection of heart disease is needed so
that it can heal easily (Sabransyah et al., 2017). The
classification system of heart disease experienced by a
person can provide information to anticipate heart dis-
ease from the start. It takes a method or algorithm in
Maryani, I., Rousyati, ., Indriyanti, ., Pratmanto, D., Kristania, Y. and Maulidah, M.
Prediction of Heart Disease Using Decision Tree in Comparison with Particle Swarm Optimization to Improve Accuracy.
DOI: 10.5220/0012447300003848
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 3rd International Conference on Advanced Information Scientific Development (ICAISD 2023), pages 233-239
ISBN: 978-989-758-678-1
Proceedings Copyright © 2024 by SCITEPRESS – Science and Technology Publications, Lda.
233