Abstract
We propose an architecture for a personal health agent (PHA) that combines machine learning and a Bayesian network (BN) for detecting and diagnosing heart disease, specifically arrhythmia. Machine learning (ML) is used for classifying a patient’s ECG signal. Four ML models, i.e. gradient boosting, random forest, multilayer perceptron and support vector machine, are compared and evaluated using a dataset of 5,340 records containing 12-lead ECG signals created from the Chapman-Shaoxing database. Among the four models, the gradient boosting model produces the best accuracy of 82.88% when classifying an ECG signal as either atrial fibrillation, other arrhythmia, or no arrhythmia. The detected pattern is integrated into a BN that captures expert knowledge about the causes of arrhythmia. The BN structure and parameters are informed by expert knowledge from the literature and evaluated using Pitchforth and Mengersen’s framework. The agent uses a decision support module to guide the diagnosis process. It suggests what questions to ask to increase certainty of the presence of arrhythmia, and it suggests what arrhythmia causes to follow up. This is achieved using sensitivity analysis and diagnostic Bayesian reasoning respectively. The architecture is evaluated using application use cases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Adeleke, J.A., Moodley, D., Rens, G., Adewumi, A.O.: Integrating statistical machine learning in a semantic sensor web for proactive monitoring and control. Sensors 17(4), 807 (2017). https://doi.org/10.3390/s17040807
Al Rahhal, M.M., Bazi, Y., Al Zuair, M., Othman, E., BenJdira, B.: Convolutional neural networks for electrocardiogram classification. J. Med. Biol. Eng. 38(6), 1014–1025 (2018). https://doi.org/10.1007/s40846-018-0389-7
Alday, E.A.P., et al.: Classification of 12-lead ECGs: the PhysioNet/Computing in Cardiology Challenge 2020. Physiol. Measur. 41(12), 124003 (2020). https://doi.org/10.1088/1361-6579/abc960
Ang, C.: Visualizing the world’s population by age group (2021). https://www.visualcapitalist.com/the-worlds-population-2020-by-age/. Accessed 12 Aug 2022
Chen, S.H., Pollino, C.A.: Good practice in Bayesian network modelling. Environ. Model. Softw. 37, 134–145 (2012). https://doi.org/10.1016/j.envsoft.2012.03.012
Chung, M.K., et al.: Lifestyle and risk factor modification for reduction of atrial fibrillation: a scientific statement from the American Heart Association. Circulation 141(16), e750–e772 (2020). https://doi.org/10.1161/CIR.0000000000000748
Clifford, G.D., et al.: AF classification from a short single lead ECG recording: the PhysioNet/Computing in Cardiology Challenge 2017. In: 2017 Computing in Cardiology (CinC), pp. 1–4. IEEE (2017). https://doi.org/10.22489/CinC.2017.065-469
Coromilas, E.J., et al.: Worldwide survey of COVID-19-associated arrhythmias. Circ.: Arrhythmia Electrophysiol. 14(3), e009458 (2021). https://doi.org/10.1161/CIRCEP.120.009458
De Oliveira, L.S., Andreão, R.V., Sarcinelli-Filho, M.: Detection of premature ventricular beats in ECG records using Bayesian networks involving the P-wave and fusion of results. In: 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology, pp. 1131–1134. IEEE (2010). https://doi.org/10.1109/IEMBS.2010.5627116
De Oliveira, L.S., Andreão, R.V., Sarcinelli-Filho, M.: Premature ventricular beat classification using a dynamic Bayesian network. In: 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pp. 4984–4987. IEEE (2011). https://doi.org/10.1109/IEMBS.2011.6091235
De Oliveira, L.S.C., Andreão, R.V., Sarcinelli-Filho, M.: The use of Bayesian networks for heart beat classification. In: Hussain, A., Aleksander, I., Smith, L., Barros, A., Chrisley, R., Cutsuridis, V. (eds.) Brain Inspired Cognitive Systems 2008. AEMB, vol. 657, pp. 217–231. Springer, Cham (2010). https://doi.org/10.1007/978-0-387-79100-5_12
Drake, R., Moodley, D.: INVEST: ontology driven Bayesian Networks for investment decision making on the JSE. In: Second Southern African Conference for Artificial Intelligence Research, pp. 252–273 (2022)
Fuster-Parra, P., Tauler, P., Bennasar-Veny, M., Ligeza, A., Lopez-Gonzalez, A., Aguiló, A.: Bayesian network modeling: a case study of an epidemiologic system analysis of cardiovascular risk. Comput. Methods Programs Biomed. 126, 128–142 (2016). https://doi.org/10.1016/j.cmpb.2015.12.010
Geselowitz, D.B.: On the theory of the electrocardiogram. Proc. IEEE 77(6), 857–876 (1989). https://doi.org/10.1109/5.29327
Ghosh, J.K., Valtorta, M.: Building a Bayesian network model of heart disease. In: 38th Annual on Southeast Regional Conference (ACM-SE 38), pp. 239–240 (2000). https://doi.org/10.1145/1127716.1127770
Hagiwara, Y., et al.: Computer-aided diagnosis of atrial fibrillation based on ECG signals: a review. Inf. Sci. 467, 99–114 (2018). https://doi.org/10.1016/j.ins.2018.07.063
Harmelen, F.: Preface: the 3rd AI wave is coming, and it needs a theory. In: Neuro-Symbolic Artificial Intelligence: The State of the Art, pp. V–VII. IOS Press BV (2022). https://doi.org/10.3233/FAIA210347-fm
Hartikainen, S., et al.: Effectiveness of the chest strap electrocardiogram to detect atrial fibrillation. Am. J. Cardiol. 123(10), 1643–1648 (2019). https://doi.org/10.1016/j.amjcard.2019.02.028
Hastie, T., Tibshirani, R., Friedman, J.: Model assessment and selection. In: Hastie, T., Tibshirani, R., Friedman, J. (eds.) The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd edn., pp. 219–259. Springer, New York (2009). https://doi.org/10.1007/978-0-387-84858-7_7
Klabunde, R.E.: Cardiac electrophysiology: normal and ischemic ionic currents and the ECG. Adv. Physiol. Educ. 41(1), 29–37 (2017). https://doi.org/10.1152/advan.00105.2016
Korb, K.B., Nicholson, A.E.: Bayesian Artificial Intelligence. CRC Press (2011)
Kornej, J., Börschel, C.S., Benjamin, E.J., Schnabel, R.B.: Epidemiology of atrial fibrillation in the 21st century: novel methods and new insights. Circ. Res. 127(1), 4–20 (2020). https://doi.org/10.1001/jama.2019.18058
Kusumoto, F.M.: ECG Interpretation: From Pathophysiology to Clinical Application. Springer, Boston (2009). https://doi.org/10.1007/978-0-387-88880-4
Kyrimi, E., Neves, M.R., McLachlan, S., Neil, M., Marsh, W., Fenton, N.: Medical idioms for clinical Bayesian network development. J. Biomed. Inform. 108, 103495 (2020). https://doi.org/10.1016/j.jbi.2020.103495
Lau, D.H., Nattel, S., Kalman, J.M., Sanders, P.: Modifiable risk factors and atrial fibrillation. Circulation 136(6), 583–596 (2017). https://doi.org/10.1161/CIRCULATIONAHA.116.023163
Lippi, G., Sanchis-Gomar, F., Cervellin, G.: Global epidemiology of atrial fibrillation: an increasing epidemic and public health challenge. Int. J. Stroke 16(2), 217–221 (2021). https://doi.org/10.1177/1747493019897870
Lu, J., et al.: Efficient hardware architecture of convolutional neural network for ECG classification in wearable healthcare device. IEEE Trans. Circuits Syst. I Regul. Pap. 68(7), 2976–2985 (2021). https://doi.org/10.1109/TCSI.2021.3072622
Mayo Clinic: Heart arrhythmia (2022). https://www.mayoclinic.org/diseases-conditions/heart-arrhythmia/symptoms-causes/syc-20350668. Accessed 13 July 2022
Mohammad, M., Emin, M., Bhutta, A., Gul, E.H., Voorhees, E., Afzal, M.R.: Cardiac arrhythmias associated with COVID-19 infection: state of the art review. Expert Rev. Cardiovasc. Ther. 19(10), 881–889 (2021). https://doi.org/10.1080/14779072.2021.1997589
Moodley, D., Simonis, I.: A new architecture for the sensor web: the SWAP framework. In: ISWC 2006: 5th International Semantic Web Conference (2006)
Moodley, D., Simonis, I., Tapamo, J.R.: An architecture for managing knowledge and system dynamism in the worldwide sensor web. Int. J. Semant. Web Inf. Syst. (IJSWIS) 8(1), 64–88 (2012). https://doi.org/10.4018/jswis.2012010104
Naccarelli, G.V., Varker, H., Lin, J., Schulman, K.L.: Increasing prevalence of atrial fibrillation and flutter in the United States. Am. J. Cardiol. 104(11), 1534–1539 (2009). https://doi.org/10.1016/j.amjcard.2009.07.022
Neil, M., Fenton, N., Nielson, L.: Building large-scale Bayesian networks. Knowl. Eng. Rev. 15(3), 257–284 (2000). https://doi.org/10.1017/S0269888900003039
Nguyen, T.N., Hilmer, S.N., Cumming, R.G.: Review of epidemiology and management of atrial fibrillation in developing countries. Int. J. Cardiol. 167(6), 2412–2420 (2013). https://doi.org/10.1016/j.ijcard.2013.01.184
Nicholson, A.E., Twardy, C.R., Korb, K.B., Hope, L.R.: Decision support for clinical cardiovascular risk assessment. In: Pourret, O., Naim, P., Marcot, B. (eds.) Bayesian Networks: A Practical Guide to Applications, pp. 33–52. Wiley, Chichester (2008). https://doi.org/10.1002/9780470994559.ch3
Olier, I., Ortega-Martorell, S., Pieroni, M., Lip, G.Y.: How machine learning is impacting research in atrial fibrillation: implications for risk prediction and future management. Cardiovasc. Res. 117(7), 1700–1717 (2021). https://doi.org/10.1093/cvr/cvab169
Orphanou, K., Stassopoulou, A., Keravnou, E.: DBN-extended: a dynamic Bayesian network model extended with temporal abstractions for coronary heart disease prognosis. IEEE J. Biomed. Health Inform. 20(3), 944–952 (2015). https://doi.org/10.1109/JBHI.2015.2420534
Patel, M.S., Asch, D.A., Volpp, K.G.: Wearable devices as facilitators, not drivers, of health behavior change. JAMA 313(5), 459–460 (2015). https://doi.org/10.1001/jama.2014.14781
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., et al.: Scikitlearn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)
Pitchforth, J., Mengersen, K.: A proposed validation framework for expert elicited Bayesian networks. Expert Syst. Appl. 40(1), 162–167 (2013). https://doi.org/10.1016/j.eswa.2012.07.026
Price, C.S., Moodley, D., Pillay, A.W., Rens, G.B.: An adaptive probabilistic agent architecture for modelling sugarcane growers’ decision-making. S. Afr. Comput. J. 34(1), 152–191 (2022). https://doi.org/10.18489/sacj.v34i1.857
Rajakariar, K., Koshy, A.N., Sajeev, J.K., Nair, S., Roberts, L., Teh, A.W.: Accuracy of a smartwatch based single-lead electrocardiogram device in detection of atrial fibrillation. Heart 106(9), 665–670 (2020). https://doi.org/10.1136/heartjnl-2019-316004
Reyna, M.A., Sadr, N., Alday, E.A.P., Gu, A., Shah, A.J., Robichaux, C.: Will two do? Varying dimensions in electrocardiography: The PhysioNet/Computing in Cardiology Challenge 2021. In: 2021 Computing in Cardiology (CinC), pp. 1–4. IEEE (2021). https://doi.org/10.23919/CinC53138.2021.9662687
Scholten, J., et al.: Six-lead device superior to single-lead smartwatch ECG in atrial fibrillation detection. Am. Heart J. 253, 53–58 (2022). https://doi.org/10.1016/j.ahj.2022.06.010
Scripps: Top 10 things you should know about heart rhythm (2015). https://www.scripps.org/sparkle-assets/documents/heart_rhythm_facts.pdf. Accessed 09 July 2022
Sznajder, M., Łukowska, M.: Python online and offline ECG QRS detector based on the Pan-Tomkins algorithm (2017). https://zenodo.org/record/591747. Accessed 22 July 2022
Uusitalo, L.: Advantages and challenges of Bayesian networks in environmental modelling. Ecol. Model. 203(3–4), 312–318 (2007). https://doi.org/10.1016/j.ecolmodel.2006.11.033
Wanyana, T., Moodley, D.: An agent architecture for knowledge discovery and evolution. In: Edelkamp, S., Möller, R., Rueckert, E. (eds.) KI 2021. LNCS (LNAI), vol. 12873, pp. 241–256. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-87626-5_18
Wanyana, T., Moodley, D., Meyer, T.: An ontology for supporting knowledge discovery and evolution. In: Gerber, A. (ed.) Southern African Conference for Artificial Intelligence Research (SACAIR), pp. 206–221 (2020)
Wanyana, T., Nzomo, M., Price, C.S., Moodley, D.: Combining machine learning and Bayesian networks for ECG interpretation and explanation. In: 8th International Conference on Information and Communication Technologies for Ageing Well and e-Health (ICT4AWE), pp. 81–92. INSTICC, SciTePress (2022). https://doi.org/10.5220/0011046100003188
Wasilewski, J., Polonski, L.: An introduction to ECG interpretation. In: Gacek, A., Pedrycz, W. (eds.) ECG Signal Processing, Classification and Interpretation: A Comprehensive Framework of Computational Intelligence, pp. 1–20. Springer, Cham (2012). https://doi.org/10.1007/978-0-85729-868-3_1
Weimann, K., Conrad, T.O.F.: Transfer learning for ECG classification. Sci. Rep. 11(1), 1–12 (2021). https://doi.org/10.1038/s41598-021-84374-8
Williams, B.A., Chamberlain, A.M., Blankenship, J.C., Hylek, E.M., Voyce, S.: Trends in atrial fibrillation incidence rates within an integrated health care delivery system, 2006 to 2018. JAMA Netw. Open 3(8), e2014874–e2014874 (2020). https://doi.org/10.1001/jamanetworkopen.2020.14874
Ye, J., Dobson, S., McKeever, S.: Situation identification techniques in pervasive computing: a review. Pervasive Mob. Comput. 8(1), 36–66 (2012). https://doi.org/10.1016/j.pmcj.2011.01.004
Zheng, J., Zhang, J., Danioko, S., Yao, H., Guo, H., Rakovski, C.: A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients. Sci. Data 7(1), 1–8 (2020). https://doi.org/10.1038/s41597-020-0386-x
Acknowledgements
This work was financially supported by the Hasso Plattner Institute for Digital Engineering through the HPI Research School at UCT.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix
Appendix
Bayes’ Rule
where Pr(A|B) is the posterior probability of A given B; Pr(B|A) is the posterior probability of B given A; and Pr(A) and Pr(B) are prior probabilities of A and B respectively.
Entropy and Mutual Information
Hyperparameter Selection Table
Algorithm | Hyperparameter | Options | Selected Options |
---|---|---|---|
Gradient Boosting | n_estimators | 300, 500, 800 | 800 |
criterion | friedman_mse, squared_error, mse | friedman_mse | |
loss | log_loss, exponential | log_loss | |
max_depth | 1, 3, 10 | 3 | |
Random Forest | n_estimators | 300, 500, 800 | 800 |
criterion | gini, entropy, log_loss | entropy | |
max_depth | 50, 100, None | None | |
max_features | sqrt, log2, None | sqrt | |
SVM | C | 0.5, 1, 1.5 | 1.5 |
kernel | poly, rbf, sigmoid | rbf | |
gamma | scale, auto | auto | |
decision_function_shape | ovo, ovr | ovo | |
MLP | hidden_layer_sizes | N/A | (158, 100, 50) |
activation | identity, logistic, tanh, relu | tanh | |
batch_size | auto, 64, 100 | auto | |
solver | lbfgs, sgd, adam | adam | |
learning_rate | constant, invscaling, adaptive | adaptive | |
max_iter | 200, 500, 1000, 2000 | 500 |
ML Metrics: Accuracy, Precision, Recall, F1-Score
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Wanyana, T., Nzomo, M., Price, C.S., Moodley, D. (2023). A Personal Health Agent for Decision Support in Arrhythmia Diagnosis. In: Maciaszek, L.A., Mulvenna, M.D., Ziefle, M. (eds) Information and Communication Technologies for Ageing Well and e-Health. ICT4AWE ICT4AWE 2021 2022. Communications in Computer and Information Science, vol 1856. Springer, Cham. https://doi.org/10.1007/978-3-031-37496-8_20
Download citation
DOI: https://doi.org/10.1007/978-3-031-37496-8_20
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-37495-1
Online ISBN: 978-3-031-37496-8
eBook Packages: Computer ScienceComputer Science (R0)