Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 335 https://internationalpubls.com Intelligent Hybrid Model for Predicting and Monitoring Heart Disease Janpreet Singh1, Dalwinder Singh2, Chaitanya Singla3, Ravneet Kaur4, Amanpreet kaur5 1,2School of Computer Science and Engineering, Lovely Professional University, Punjab. India. 3,4Department of Computer Science and Engineering, Chandigarh Engineering College, Chandigarh Group of Colleges Jhanjeri, Mohali - 140307, Punjab 5Chitkara University Institute of Engineering and Technology, Chitkara University, Punjab, India Corresponding author: janpreet.s@gmail Article History: Received: 19-08-2024 Revised: 30-09-2024 Accepted: 18-10-2024 Abstract: When it comes to the most important and critical aspect in Health care industry, so procedure of Heart Disease Diagnosis can be more conceptualised as this is only way by which we come to know about heart disease patients life – for such kind a risk factor helps patient department downfall disease at an stage. However, this process also causes errors in many cases and abounds with unexpected consequences or a patient dies by it. Therefore, the main difficult predictions in medical sector for heart disease diagnosis by doctors. So, in this technical generation we can very easily appreciate and value the role of artificial intelligence in healthcare. Accordingly, the essence of this study was to introduce a heart disease monitoring model that applies neuro fuzzy as hybrid ML methodology. In the proposed intelligent hybrid inference system, there are input variables used to diagnose disease at different stages. The system produces the output that yields the three different disease stages or levels. Thus, on this generated result base professional doctors of the heart can diagnose over patient and even decide better operation for treatment according to disease state. The k-fold cross validation technique does the same partitioning of the dataset and for testing. It also estimates the performance of system and by its results it accurately predicts stage of heart disease from which a patient is suffering with accuracy 98.90%. Keywords: Heart disease, classification, artificial intelligence, fuzzy inference system (FIS), medical diagnostic system, neuro fuzzy method, ANFIS. 1. Introduction Globally, the leading cause of high mortality is heart disease or also known as cardiovascular disease (CVD) [1]. According to the newly done investigation by World Heart Federation [2], it is estimated that one in every three deaths are due to these diseases. Stroke, along with heart failure will be the most common causes of 23.6M deaths due to heart diseases worldwide by year 2030 as reported from W.H.O [3].In India the occurrence of these disorders is 2 to 3 times more than most western countries [4]. Though deaths due to heart diseases were more in developing countries than the past few decades, but the occurrence of heart disorders was high developed country [5] The high burden of heart disease cannot be all pointed to alcohol consumption but rather the other risks which contribute as well; unhealthy diet, hypertension, physical inactivity along with obesity and diabetes [6], [7], [8]. Additionally, these diseases are associated with poor quality of life and a substantial economic burden on health care system worldwide [9]. Now, the biggest question arises whether the prediction of heart disease is possible before it reaches its worst stage or not. Currently, intelligent algorithms (or models) based on advanced computer technology have saved many lives of patients and played a significant role in difficult uncertain tasks within the healthcare system [10]. Computer assisted tools and programmes to diagnose or treat patients are becoming an ever-important topic [11]. In addition, given the uncertainty in medical diagnoses, health-care professionals are using technology to help them make more informed choices [12]. However, the most suitable technologies which can handle these uncertainties in a better way are neural networks and fuzzy logic [13], [14]. Here methods have been more useful in setting where there Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 336 https://internationalpubls.com is uncertainty or available prior information [15], [16], [17] and have shown to work better than traditional approaches. If two of these methods are used alone, then there can be both cons as well for each. However, incorporation of neuro-fuzzy results an effective model that carries the advantages both from neural networks (such as connectionist structure) and fuzzy logic (like human-like reasoning style) [18-21]. Also, ANFIS uses Takagi Sugeno type FIS which is a neuro fuzzy model introduced in 1993 [22, 23]. The fuzzy modelling process would then be able to already get training data for the identification of parameters of membership functions linked to input-output FIS memory elements [24-26] associated with both input and output information. It builds values and rules for the membership function automatically during training [27]. The rules were written in Set of (IF, THEN) statements and the synaptic weights have not been used [28]. This method is applied to predict, diagnose and treat a classification of illnesses [29]. This approach consists of five layers like in figure 1. Figure 1 ANFSI Layers [30] In this study a model was put forward capable of tracking heart diseases such as coronary arteries disease based on machine methodology hybrid with learning, that is fuzzy approach [31-32]. This stage is twice the number of input variables used to determine disease grading through entire intelligent hybrid inference model. It is the output that gets generated in this case giving us three stages or levels of disease. The results provide a robust base for the use of ANFIS as predicting tool for heart problems. The paper is divided into 4 sections, section 1 introduces the subject and section 2 illustrates the implementation method followed by experimental results are presented in section 3 and for evaluating the performance of a hybrid model developed via specific criteria's calculating and at last in fourth section. 2. Methodology The supreme and beneficial approaches of machine learning joined hands in creating an intelligent hybrid method. As this method sport the pros or advantages of Fuzzy logic and also neural network to give out the final results that’s why it’s called "neuro-fuzzy". Moreover, the gain a vital way of using these two methods replace other is that one approach band by superior profit another. Therefore, as a result both methods support each other in providing very precise adheres to. The paper also presents an intelligent hybrid system which supports the monitoring process of numerous stages related to heart diseases. The seven were cholesterol, blood pressure, diabetes, irregular heartbeat (and combination), smoking and shortness of breath and age, was been inputted to the smart model as different features. In the same way, stages normal stage, early stage and advanced stages are various output that is given by system once it processes input value passed to it. Figure 2 represents the flow of methodology adopted while implementing this model. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 337 https://internationalpubls.com Figure 2 Flow of used methodology 2.1. Membership Functions In this study, triangular membership functions were used for both the input and output variables. Each input variable has a different number of membership functions (MFs). For example, input 1 (cholesterol) has 4 MFs, input 2 (blood pressure) has 3 MFs, and inputs 3 to 6 (diabetes, irregular heartbeat, smoking, and shortness of breath) each have 2 MFs. Input 7 (age) has 4 MFs. The structure of the ANFIS model is shown in Table 1 and Figure 4. The FIS properties of the ANFIS model are shown in Figure 3. Figures 5 to 11 show the representation of all 7 inputs. Table 1 Structure of ANFIS Structure of ANFIS No of layer of ANFIS 5 Number of input variables 7 Name of input variables • Cholesterol as input 1 • Blood Pressure as input 2 • Diabetes as input 3 • Irregular Heartbeat as input 4 • Smoking as input 5 • Shortness of breath as input 6 • Age as input 7 Type of membership function Triangular Number of rules 768 Number of outputs 1 Number of stages of disease 3 Name of stages • Normal stage • Early stage • Advanced stage The table above explains the design and settings of an ANFIS model made to help diagnose medical conditions, specifically to determine the stage of a disease. It has five layers: input nodes, rule nodes, average nodes, consequent nodes, and the output node. There are seven inputs to the system: Cholesterol, Blood Pressure, Diabetes, Irregular Heartbeat, Smoking, Shortness of Breath, and Age. Each input is fuzzified using triangular membership functions. The model uses 768 fuzzy rules to connect the inputs to one output. The output classifies the disease into three stages: Normal, Early, and Advanced. This helps assess how serious the disease is based on the inputs. The use of triangular membership functions and many fuzzy rules allows the model to handle complex data and give accurate diagnosis results. This approach supports early detection and timely treatment. The use of this Data Acquistion Divisoning of data using k-fold cross validation Division of training dataset using 80% of data samples Train the model using ANFIS Division of testimg dataset using 20% of data semples Performance Analysis Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 338 https://internationalpubls.com methodological approach allows an in-depth analysis on the health status of a patient and may contribute to elucidating preliminary changes with proper intervention. Figure 3 FIS properties of developed intelligent hybrid model Figure 4 ANFIS model structure The image displays a graphical representation of an ANFIS (Adaptive Neuro-Fuzzy Inference System) model structure. ANFIS is a type of artificial neural network that combines fuzzy logic with neural networks. The structure is broken down into different layers: Input: This layer represents the input variables to the system. In this case, there are 9 input variables represented by black circles. Input Membership Functions (inputmf): This layer contains the membership functions for each input variable. The white circles represent the membership functions. Each input variable has multiple membership functions, and the lines connecting them show the connections between the input and the membership functions. Rule: This layer represents the fuzzy rules that govern the system's behavior. The lines connecting it to the inputmf layer shows that each rule is generated by combining one membership function from each input variable. Output Membership Functions (outputmf): This layer contains the membership functions for the output variable. The connections from the rule layer to the output membership function (shown as black) illustrate that each rule contributes to the output. Output: This layer represents the final output of the ANFIS system. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 339 https://internationalpubls.com Figure 5 MF plot of input 1 Figure 6 MF plot of input 2 Figure 7 MF plot of input 3 Figure 8 MF plot of input 4 Figure 9 MF plot of input 5 Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 340 https://internationalpubls.com Figure 10 MF plot of input 6 Figure 11 MF plot of input 7 2.2. Rules The system works by automatically generating rules during the training phase, using all possible combinations of the input data. This is done to determine the stage of heart disease. The intelligent hybrid model takes the provided input variables, such as cholesterol, blood pressure, and others, and applies these combinations to create rules. During the training, the model learns from the input data (shown in Figure 12) and generates 768 rules. These rules help the model map different combinations of input data to a specific output, which is the stage of heart disease (Normal, Early, or Advanced). The number of rules comes from multiplying the number of membership functions (MFs) used for each input variable. For example, if one input has 4 MFs and another has 3, multiplying them gives 12 rules. By combining all the input variables and their MFs, the system creates 768 rules in total, allowing it to cover a wide range of input combinations and improve the accuracy of the diagnosis. This process makes the model more effective in identifying the stage of heart disease by learning from diverse data during training. 2.3. Training phase and Testing phase When implementing the hybrid system, the training and testing phases play a critical role in ensuring the model is accurate and reliable. Figure 12 Rules generated by the model Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 341 https://internationalpubls.com Here's how the process works in simple terms: First, the data needed for the system is collected from a heart specialist. This data includes information about patients that is essential for diagnosing heart disease. Once the data is gathered, it's divided into different sections using a method called k-fold cross-validation. This is a standard technique to split data into multiple parts so the system can be trained and tested in a balanced way. In this study, there are 800 data samples, meaning the data contains 800 entries or records from patients. The k in k-fold cross-validation represents how many parts the data is split into. For example, in this case, k is set to 4, so the data is divided into four equal parts. This is called 4-fold cross- validation. After dividing the data into four sections, the system undergoes several rounds of training and testing. Here’s how it works: First round: The 1st part of the data is used for testing the system, while the other three parts (2nd, 3rd, and 4th) are used for training the system. Second round: The 2nd part is now used for testing, and the 1st, 3rd, and 4th parts are used for training. Third round: The 3rd part is used for testing, and the 1st, 2nd, and 4th parts are used for training. Fourth round: The 4th part is used for testing, and the 1st, 2nd, and 3rd parts are used for training. In each round, a different section of the data is tested, and the remaining sections are used to train the system. This process ensures that every part of the data is tested at least once, making the model more balanced and thorough in its learning. Out of the 800 samples, in each round, 640 samples (or 80%) are used for training the system, and 160 samples (or 20%) are used for testing. This helps ensure that the system has enough data to learn from while also being tested on a portion of the data it hasn’t seen before. This way, the model's performance can be checked with data not used in training. The system goes through 10 training cycles, also called epochs, during which it learns from the training data to improve its performance. After the training phase, the system is validated to check if it can accurately classify patients into different stages of heart disease—whether it’s a normal stage, early stage, or advanced stage. Figure 13 in the study shows the training error during the training phase. This error rate is an important measure of how well the system is learning. The lower the error, the more accurate the system is in predicting the correct stage of heart disease. This entire process helps ensure that the developed hybrid system can reliably support early diagnosis and proper treatment for heart disease patients. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 342 https://internationalpubls.com Figure 13 Training error at 10 epochs 3. Results If the observed value and target are the same (nearly) then its mean technique is considered acceptable, otherwise it does not provide diagnosis information for patients having distinct stages of heart disease. Upon analysis, it can be seen that the system has appropriately computed whether or not there is heart disease based on detected stage of water level. Confusion matrices for 3 folds are shown on Table2 to Table5. Table 2 Confusion matrix for fold 1 Normal Stage Early stage Advanced Stage Class Name 52 01 00 Normal stage 02 48 00 Early stage 00 00 57 Advanced stage Table 3 Confusion matrix for fold 2 Normal Stage Early stage Advanced Stage Class Name 53 00 00 Normal stage 00 49 01 Early stage 00 00 57 Advanced stage Table 4 Confusion matrix for fold 3 Normal Stage Early stage Advanced Stage Class Name 52 01 00 Normal stage 00 50 00 Early stage 00 00 57 Advanced stage Table 5 Confusion matrix for fold 4 Normal Stage Early stage Advanced Stage Class Name 53 00 00 Normal stage 02 48 00 Early stage 00 00 57 Advanced stage The dimensionality of above given confusion matrix is reduced to 2 by considering the first column, “normal stage” as “No”, and 2nd and 3rd columns, which are “early stage” and “advanced stage” as “Yes”. The confusion matrices with reduced dimensionality are displayed in table 6 to 9. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 343 https://internationalpubls.com Table 6 Decreased dimensionality of a confusion matrix for k = 1 No Yes Class Name 52 01 No 02 105 Yes Table 7 Decreased dimensionality of a confusion matrix for k = 2 No Yes Class Name 53 01 No 00 106 Yes Table 8 Decreased dimensionality of a confusion matrix for k = 3 No Yes Class Name 52 01 No 00 107 Yes Table 9 Decreased dimensionality of a confusion matrix for k = 4 No Yes Class Name 53 00 No 02 105 Yes The performance for each fold, by employing the TPs, TNs, FPs, and FNs values available in the above four tables (from 6th to 9th) of outputs is computed within the model. Table 10 The various parameters to compute the performance of the developed intelligent hybrid system heart disease monitoring and their respective values Table full size Figure 14 illustrates the bar chart of measured performance. Table 10 Measured performance of the model Parameters k = 1 k = 2 k = 3 k = 4 Overall Performance Classification accuracy 98.12 99.37 99.37 98.75 98.90 Specificity 96.29 100 100 96.36 98.16 Sensitivity 99.05 99.05 99.07 100 99.29 Precision 98.13 100 100 98.13 99.06 Figure 14 Graphical representation of calculated performance parameters at each fold and overall performance 4. Conclusion The outcome of the resulted model, which classifies stage detection in heart disease (with an adaptive neuro-fuzzy inference system) can be used by health care professionals and non-professionals to early detect this illness. This system can also aid doctors to keep the patient healthy. In training phase, introduced intelligent hybrid system is first tested by using appropriate dataset. Subsequently, the system was experimentally validated to measure that different intelligent hybrid forecasting systems provide optimal outputs. Also, the model output is used to evaluate performance parameters and hence Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 344 https://internationalpubls.com it helps discover that our AI model has an accuracy 98.90%. Performance evaluations reported that the hybrid system created using ANFIS performed well and it provided accurate results which has got wide acceptability for monitoring heart diseases in a healthcare sector. Other biomarkers may be found in future studies, and other machine learning methods can also be explored to develop a pedagogical tool that assists experts and beginners in more precise early-stage heart disease tracking. References [1] Abdellatif, H. Abdellatef, J. Kanesan, C.-O. Chow, J. H. Chuah, and H. M. Gheni, “Improving the heart disease detection and patients’ survival using supervised infinite feature selection and improved weighted random forest,” IEEE Access 10 (2022), 67363–67372. [2] R. T. Selvi and I. Muthulakshmi, “Retracted article: An Optimal Artificial Neural Network based big data application for heart disease diagnosis and classification model,” Journal of Ambient Intelligence and Humanized Computing 12(6) (2020), 6129–6139. [3] G. Andreoni, E. G. Caiani, and N. Castaldini, “Digital Health Services Through Patient Empowerment: Classification, Current State and Preliminary Impact Assessment by Health Pod Systems,” Applied Sciences 12(1) (2021), 359-359. [4] A. Sreeniwas Kumar and N. Sinha, “Cardiovascular disease in India: A 360 degree overview,” Medical Journal Armed Forces India 76(1) (2020), 1–3. [5] Y. G. Tefera, T. M. Abegaz, T. B. Abebe, and A. B. Mekuria, “The changing trend of cardiovascular disease and its clinical characteristics in Ethiopia: Hospital based observational study,” Vascular Health and Risk Management 13 (2017), 143–151. [6] G. Musinguzi, R. Ndejjo, I. Ssinabulya, H. Bastiaens, H. van Marwijk, and R. K. Wanyenze, “Cardiovascular risk factor mapping and distribution among adults in Mukono and Buikwe Districts in Uganda: Small area analysis,” BMC Cardiovascular Disorders 20(1) (2020). [7] Y. Ruan, Y. Guo, Y. Zheng, Z. Huang, S. Sun, P. Kowal, Y. Shi, and F. Wu, “Cardiovascular disease (CVD) and associated risk factors among older adults in six low-and middle-income countries: Results from sage wave 1,” BMC Public Health 18(1) (2018). [8] D. S. Arsyad, J. Westerink, M. J. Cramer, J. Ansar, Wahiduddin, F. L. Visseren, P. A. Doevendans, and Ansariadi, “Modifiable risk factors in adults with and without prior cardiovascular disease: Findings from the Indonesian National Basic Health Research,” BMC Public Health 22(1) (2022). [9] M. Amini, F. Zayeri, and M. Salehi, “Trend analysis of cardiovascular disease mortality, incidence, and mortality-to- incidence ratio: Results from Global Burden of Disease Study 2017,” BMC Public Health 21(1) (2021). [10] P. Vadamodula, B. S. Satwika, and A. Swamy, “An Ensemble Approach to Predict the Presence of Cardio Vascular Disease using Machine Learning and Deep Learning.,” Journal of Emerging Technologies and Innovative Research (JETIR) 9(10) (2022), 559–563. [11] N. Shahid, T. Rappon, and W. Berta, “Applications of artificial neural networks in health care organizational decision- making: A scoping review,” PLOS ONE 14(2) (2019). [12] R. T. Sutton, D. Pincock, D. C. Baumgart, D. C. Sadowski, R. N. Fedorak, and K. I. Kroeker, “An overview of clinical decision support systems: Benefits, risks, and strategies for Success,” npj Digital Medicine 3(1) (2020). [13] Ł. Apiecionek, R. Moś, and D. Ewald, “Fuzzy neural network with ordered fuzzy numbers for Life Quality Technologies,” Applied Sciences 13(6) (2023), 3487-3487. [14] P. Keikhosrokiani, A. B. Naidu A/P Anathan, S. Iryanti Fadilah, S. Manickam, and Z. Li, “Heartbeat sound classification using a hybrid adaptive neuro-fuzzy inferences system (ANFIS) and Artificial Bee Colony,” DIGITAL HEALTH 9 (2023). [15] O. Taylan, A. S. Alkabaa, H. S. Alqabbaa, E. Pamukçu, and V. Leiva, “Early prediction in classification of Cardiovascular Diseases With Machine Learning, neuro-fuzzy and statistical methods,” Biology 12(1) (2023), 117- 117. [16] T. Kasbe and R. S. Pippal, “Design of heart disease diagnosis system using fuzzy logic,” 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS) (2017). Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 345 https://internationalpubls.com [17] K. Balasubramanian and N. P. Ananthamoorthy, “Improved adaptive neuro-fuzzy inference system based on modified glowworm swarm and differential evolution optimization algorithm for medical diagnosis,” Neural Computing and Applications 33(13) (2020), 7649–7660. [18] K. V. Shihabudheen and G. N. Pillai, “Recent advances in neuro-Fuzzy System: A survey,” Knowledge-Based Systems 152 (2018), 136–162. [19] G. Zhang, S. S. Band, S. Ardabili, K.-W. Chau, and A. Mosavi, “Integration of neural network and fuzzy logic decision making compared with bilayered neural network in the simulation of Daily Dew Point temperature,” Engineering Applications of Computational Fluid Mechanics 16(1) (2022), 713–723. [20] K. Damodara and A. Thakur, “Adaptive Neuro Fuzzy Inference System based prediction of chronic kidney disease,” 2021 7th International Conference on Advanced Computing and Communication Systems (ICACCS) (2021). [21] J. Singla and B. Kaur, “A medical intelligent system for diagnosis of chronic kidney disease using adaptive neuro- fuzzy inference system,” Nature-Inspired Optimisation Algorithms (2021), 19–32. [22] J. Feng, Q. Wang, and N. Li, “An intelligent system for heart disease prediction using adaptive neuro-fuzzy inference systems and genetic algorithm,” Journal of Physics: Conference Series 2010(1) (2021), 012172-012172. [23] J.-S. R. Jang, “ANFIS: Adaptive-network-based Fuzzy Inference System,” IEEE Transactions on Systems, Man, and Cybernetics 23(3) (1993), 665–685. [24] M. Kabir and M. M. Kabir, “Fuzzy membership function design: An adaptive neuro-fuzzy inference system (ANFIS) based approach,” 2021 International Conference on Computer Communication and Informatics (ICCCI) (2021). [25] S. Chidambaram, S. S. Ganesh, A. Karthick, P. Jayagopal, B. Balachander, and S. Manoharan, “Diagnosing breast cancer based on the adaptive neuro-fuzzy inference system,” Computational and Mathematical Methods in Medicine 2022 (2022), 1–11. [26] B. Paul and B. Karn, “ANFIS based diabetes mellitus prediction,” 2021 IEEE 8th Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON) (2021). [27] N. Jindal, J. Singla, B. Kaur, H. Sadawarti, D. Prashar, S. Jha, G. P. Joshi, and C. Seo, “Fuzzy logic systems for diagnosis of renal cancer,” Applied Sciences 10(10) (2020), 3464-3464. [28] D. Singh, S. Verma, and J. Singla, “A neuro-fuzzy based medical intelligent system for the diagnosis of hepatitis B,” 2021 2nd International Conference on Computation, Automation and Knowledge Management (ICCAKM) (2021). [29] Nikita, B. Kaur, D. H. Sadawarti, and D. J. Singla, “A Neuro-Fuzzy Based Intelligent System For Diagnosis Of Renal Cancer,” International Journal of Scientific and Technology Research 9(1) (2020), 3699–3705. [30] N. Ziasabounchi and I. Askerzade, “ANFIS Based Classification Model for Heart Disease Prediction,” International Journal of Engineering & Computer Science IJECS-IJENS 14(2) (2014), 7–12. [31] C. Singla, R. Kaur, J. Singh, N. Nisha, A. K. Singh, and T. Singh, “Fine Tuned Pre-Trained Deep Neural Network for Automatic Detection of Diabetic Retinopathy Using Fundus Images,” International Journal of Intelligent Systems and Applications in Engineering, vol. 11, no. 9s, pp. 735–742, Jul. 2023. [32] C. Singla, B. K. Sahoo, R. Kaur, P. Sahu, H. Singh, and U. Kaur, “Prediction and Classification of Cardio Vascular Diseases using Ensemble Learning,” 2022 2nd International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Apr. 2022.