Role and Performance of Different Traditional Classification and Nature-Inspired Computing Techniques in Major Research Areas 1 Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System Iftikhar Naseer1,*, Bilal Shoaib Khan1, Shazia Saqib2, Syed Nadeem Tahir3, Sheraz Tariq1, Muhammad Saleem Akhter1 1Department of Computer Science, Minhaj University, Lahore, Pakistan. 2Department of Computer Science, Lahore Garrison University, Lahore, Pakistan. 3Ph.D. Scholar, IAS Department, University of the Punjab, Lahore, Pakistan. Abstract The death ratio caused by heart diseases is threating around the world. Efficient and accurate diagnosis through information technology can turn over this picture. This article proposed Diagnosis Heart Disease using Mamdani Fuzzy Inference (DHD-MFI) based expert system which intelligently diagnoses heart disease. In an explorative pattern, the current research has taken six conducive variables for the purpose of fuzzy logic technical enhancement in the diagnosis of heart disease. The input fields comprise of age, chest pain, electrocardiography, blood pressure systolic, diabetic and cholesterol are transmitted with the help of Fuzzy rules which are framed in the light of low, normal, high and very high intensity among the input variations. The single output is obtained as a clinical decision support system for the heart diagnosis by using the Mamdani Inference method. The proposed DHD-MFI based expert system gives 94% overall accuracy. Keywords: DHD-MFI, CAD, ECG, BP, CP, Mamdani Inference. Received on 02 August 2019, accepted on 05 January 2020, published on 15 January 2020 Copyright Β© 2020 Iftikhar Naseer et al., licensed to EAI. This is an open access article distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/3.0/), which permits unlimited use, distribution and reproduction in any medium so long as the original work is properly cited. doi: 10.4108/eai.15-1-2020.162736 *Corresponding author. Email: iftikharnaseer@gmail.com 1. Introduction Information Technology plays an important role in every aspect of life in this era. Decision support systems based on knowledge, proficiency and logical reasoning ability [1]. Fuzzy logic has the ability to handle the uncertainty of data in a proper approach [1, 2]. Heart disease is the main cause of death all over the world [3]. The proper diagnosis of heart disease is very important to survive from death [4]. Medical practitioners use their expertise to predict heart disease. Sometimes, doctors may get confused about the diagnosis of heart disease due to many risk factors involved in it [3, 4, 5]. According to Mehdi et. al., heart disease diagnosis is a very difficult task that needs accurate results [6]. Computer-Aided Diagnostic (CAD) system is very helpful in diagnosing heart disease condition of the patients. They pointed out that the consideration of accuracy always demands acute diagnosis of heart disease [6]. In this regard, the CAD system is very helpful in the diagnosis of heart disease and the suffering level of the patients. In this context, CAD is frequently used for the diagnosis of cardiovascular diseases all over the world but still, medical data faces problems to properly implement it [4, 6]. To handle this problem the researchers presented a system that is based on fuzzy logic for the heart disease diagnosis. The fuzzy logic system based on CAD with five input variables that consume a short time for the medical process to decide the diagnosis of heart disease. The performance of the proposed system was compared with the previous rough- fuzzy classifier system which used an open-source cardiovascular disease dataset. The results have shown 72.6% accuracy which is better than the past work [6]. Kasbe and Pippal designed a system with the help of fuzzy logic for the diagnosis of heart diseases [4]. This system has used 13 input variables and 1 output variable. The database has taken from V.A. Medical Center, Long EAI Endorsed Transactions on Scalable Information Systems Research Article EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 2 Beach, and Cleveland Clinic Foundation. The centroid method was applied for defuzzification. The medical experts, as well as the patients, can use this system with ease. The researchers have observed its accuracy 93.33% which is better than previous systems [4]. Aliz Adehsania et. al., observed many existing models for diagnosis heart diseases [5]. According to researchers, angiography is the best accurate system for the diagnosis of cardiovascular diseases but this method faces problems and cost issues. So, the researchers found a novelty technique for the diagnosis of heart disease by using data mining. The researchers proposed a model based on the classification to predict heart disease. The results of their model were better than the previous method [5]. Adeli and Neshat designed a fuzzy expert system for cardiovascular disease diagnosis based on V.A. Medical Centre, Long Beach and Cleveland Clinic Foundation database [7]. The system used 13 parameters as input and one parameter as output. The accuracy of the system was 94% which is better than the existing fuzzy expert systems [7]. 2. Related Work Anooj has proposed a system based on weight fuzzy rule for the diagnosis of cardiovascular disease [8]. In the first step of the system, the weighted fuzzy rules generated from the mining techniques and variable selections and in the second step, a fuzzy rule-based system is developed with the help of weighted fuzzy rules. The selected datasets Cleveland, Hungary, and Switzerland have a large amount of information about heart disease. This clinical decision support system has been tested and experimental results are found much accurate and precise [8]. Hassan et. al., stated that heart disease is the main reason for death all over the world [9]. The early prediction of cardiovascular disease can help to reduce the death rate. Many systems are available for early prediction of heart disease and still, there is a need to explore more. The researchers proposed a fuzzy soft expert system for the early detection of heart disease based on the fuzzy soft set theory. Their proposed system based on four parts i.e. fuzzy values; fuzzy soft set, fuzzy soft set parameter, and an algorithm. The study based on systolic blood pressure, low-density lipoprotein cholesterol, blood sugar, maximum heart rate, old pack and age variables. It is perceived that the suggested model is supportive for the medical experts in taking decisions regarding heart diseases [9]. Akinyokun et. al., designed a model based on the advancement of a Web and Fuzzy Logic-based Expert System for heart disease failure [10]. The proposed system comprises a Knowledge Base (which is comprised of a Database), a Fuzzy Logic part, a Fuzzy inference engine, and a decision support engine. All these elements of the system converted into the cognitive and emotional filters as well as tele-prescription facilities. Their proposed model was implemented using JavaScript, Hypertext Mark-up Language and Hypertext Preprocessor with My Structured Query Language as a database. The results shared with heart experts and satisfied with the performance of the system [10]. Bhatla et. al., introduced a new technique for coronary illness by using fuzzy logic and data mining [11]. This proposed methodology depended on Decision Tree and NaΓ―ve Bayes. The six parameters were diminished into four parameters i.e. Chest pain, blood pressure, No. of vessels colored and treadmill test which had less expense of lab test. In the proposed system, the output based on Normal, Low Risk, Medium Risk, and High Risk. The results stored in the database that connected with this model. In the database, the patient's record was maintained. The correctness and efficiency were measured through NaΓ―ve Bayes and Decision Tree using fuzzy logic. The results showed 0 for Decision Tree and 0.0072 for NaΓ―ve Bayes Classifier [11]. Computational intelligence techniques: Fuzzy System [12, 13], Swarm Intelligence [14], Evolutionary Computing [15, 16] and Neural Network [17] are mostly used in different fields of sciences like Intelligent Diagnose System [12], Smart Health [13], Smart City [18], Cloud Computing [19], Robotics [20], Wireless communication etc. Nowadays, hybrid structures of these four branches are very popular due to their performance [13, 14, 18]. In last decades predictions of the medical disease using machine learning approaches are one of the hot research areas. 3. Research Methodology The basic aim of this system is to present an applicable and reliable expert system for the acute diagnosis of heart disease. Figure 1 shows the proposed system research methodology. Iftikhar Naseer et al. EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 3 In the first phase, relevant variables are selected with the consultation of Medical Practitioners. If variables are less important, then they are discarded. In the second phase, the fuzzification is applied to crisp input values for the transformation of input sets. After that fuzzy rules are applied on fuzzy input sets in fuzzy inference. After fuzzy rules, defuzzification is applied on fuzzy output set which finally converts fuzzy output set into crisp output. 3.1. Proposed DHD-MFI Expert System In proposed DHD-MFI expert system based on six input parameters like Age (A), Blood Pressure systolic (BP), Cholesterol (C), Diabetic (D), Chest Pain (CP) and Electrocardiography (ECG) and one output Diagnosis Heart Disease (DHD) is used as shown in figure 2. Fig. 2. Proposed DHD-MFI Expert System Proposed Diagnosis Heart Disease-MFI expert system mathematically can be written as: πœ‡πœ‡π΄π΄βˆ©π΅π΅π΅π΅βˆ©πΆπΆβˆ©π·π·βˆ©πΆπΆπ΅π΅βˆ©πΈπΈπΆπΆπΈπΈ(π‘Žπ‘Ž, 𝑏𝑏𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑐𝑐𝑏𝑏, 𝑒𝑒𝑐𝑐𝑒𝑒) = minοΏ½πœ‡πœ‡π΄π΄(π‘Žπ‘Ž), πœ‡πœ‡π΅π΅π΅π΅(𝑏𝑏𝑏𝑏), πœ‡πœ‡πΆπΆ(𝑐𝑐), πœ‡πœ‡π·π·(𝑑𝑑), πœ‡πœ‡πΆπΆπ΅π΅(𝑐𝑐𝑏𝑏), πœ‡πœ‡π‘’π‘’π‘’π‘’π‘’π‘’(𝑒𝑒𝑐𝑐𝑒𝑒)οΏ½ (1) 3.2. Input Fuzzy Sets: Statistical values of input fuzzy parameters are used for the diagnosis of heart disease as shown in table 1. In this research, six input parameters are used with the following description. Table 1. Proposed DHD-MFIS Input Fuzzy Sets Sr. No. Input Variables Range Description 1 Age (Year) 0 – 18 14 – 38 >36 Child Young Old 2 Blood Pressure BP Systolic (mm Hg) < 90 80 – 140 >138 Low Normal High 3 Cholesterol mg/dL (mg per < 95 90-120 Optimal Desirable Fig. 1. Proposed DHD-MFI Expert System Research Methodology Age MFI Expert System DHD Diabetic Cholesterol Blood Pressure Chest Pain ECG Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 4 deciliter) >125 Above Normal 4 Diabetic (HbA1c) 0 – 0.6 0.55 – 8.0 >7.5 Controlled Well Controlled Uncontrolled 5 Chest Pain 0 – 0.35 0.3 – 0.70 0.65 – 1 Non-Cardiac Atypical Typical 6 ECG(Electro- cardiography) (mV) 0 – 0.35 0.3 – 0.70 0.65 – 1 Non-Significant ST-Segment Depression ST-Segment 3.3. Output Fuzzy Sets: The Diagnosis Heart Diseases (DHD) is the output of the proposed DHD-MFI expert system which is shown in table 2. Table 2. Output Fuzzy Sets Sr. No. Output Variables Range Description 1 Diagnosis Heart Diseases (DHD) 0 – 0.28 0.25 – 0.58 0.50 – 0.82 0.75 – 1 Negative Border Line Positive Strongly Positive 3.4. Membership Functions: Membership function provides values between 0 and 1. Tram membership function is used in the proposed DHD- MFI based expert system shown in table 3. The Proposed DHD-MFI expert system Input/Output (I/O) variables mathematically Membership Functions (MF) are shown in table 3. Table 3. Proposed DHD-MFI Mathematical MF representation of I/O variable S r. N o Input Variabl es Mathematical Representation of Membership Functions 1 Age (Year) Β΅Age (a) πœ‡πœ‡π΄π΄,𝐢𝐢 (π‘Žπ‘Ž) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 18 βˆ’ π‘Žπ‘Ž 4 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ 𝐴𝐴,π‘Œπ‘Œ(π‘Žπ‘Ž) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ π‘Žπ‘Ž βˆ’ 14 4 , 1, 42 βˆ’ π‘Žπ‘Ž 4 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡π΄π΄,𝑂𝑂 (𝑠𝑠) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ π‘Žπ‘Ž βˆ’ 38 6 , 1 οΏ½ , 0οΏ½οΏ½ 2 Blood Pressure BP Systolic (mm Hg) Β΅BS (bs) πœ‡πœ‡π΅π΅π΅π΅,𝐿𝐿 (𝑏𝑏𝑠𝑠) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 90 βˆ’ 𝑏𝑏𝑠𝑠 10 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ BS,𝑁𝑁(𝑏𝑏𝑠𝑠) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑏𝑏𝑠𝑠 βˆ’ 80 10 , 1, 140 βˆ’ 𝑏𝑏𝑠𝑠 5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡π΅π΅π΅π΅,𝐻𝐻 (𝑏𝑏𝑠𝑠) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑏𝑏𝑠𝑠 βˆ’ 138 2 , 1 οΏ½ , 0οΏ½οΏ½ 3 Cholesterol mg/dL (milligrams per deciliter) Β΅LDL (ch) πœ‡πœ‡πΆπΆ,𝑂𝑂 (𝑐𝑐) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 90 βˆ’ 𝑐𝑐 5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ C,𝐷𝐷(𝑐𝑐) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑐𝑐 βˆ’ 95 5 , 1, 125 βˆ’ 𝑐𝑐 5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡πΆπΆ,𝐴𝐴𝑁𝑁 (𝑐𝑐) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ c βˆ’ 120 5 , 1 οΏ½ , 0οΏ½οΏ½ 4 Diabetic (HbA1c) Β΅D (d) πœ‡πœ‡π·π·,𝐢𝐢 (𝑑𝑑) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 0.6 βˆ’ 𝑑𝑑 . 05 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ D,WC(𝑑𝑑) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑑𝑑 βˆ’ 0.55 0.5 , 1, 0.80 βˆ’ 𝑑𝑑 0.5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡π·π·,π‘ˆπ‘ˆπ‘π‘ (𝑑𝑑) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ d βˆ’ 0.75 0.05 , 1 οΏ½ , 0οΏ½οΏ½ 5 Chest Pain Β΅CP(cp) πœ‡πœ‡πΆπΆπ΅π΅,NC (𝑐𝑐𝑏𝑏) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 0.35 βˆ’ 𝑐𝑐𝑏𝑏 . 05 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ CP,AT(𝑐𝑐𝑏𝑏) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑐𝑐𝑏𝑏 βˆ’ 0.3 0.5 , 1, 0.70 βˆ’ 𝑐𝑐𝑏𝑏 0.5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡πΆπΆπ΅π΅,𝑇𝑇 (𝑐𝑐𝑏𝑏) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ cp βˆ’ 0.65 0.05 , 1 οΏ½ , 0οΏ½οΏ½ 6 ECG (Electrocar dio graph) (mV) Β΅ECG(ecg) πœ‡πœ‡πΈπΈπΆπΆπΈπΈ,NC (𝑒𝑒𝑐𝑐𝑒𝑒) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 0.35 βˆ’ 𝑒𝑒𝑐𝑐𝑒𝑒 . 05 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ ECG,STβˆ’SD(𝑒𝑒𝑐𝑐𝑒𝑒) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ 𝑒𝑒𝑐𝑐𝑒𝑒 βˆ’ 0.3 0.5 , 1, 0.70 βˆ’ 𝑒𝑒𝑐𝑐𝑒𝑒 0.5 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡πΈπΈπΆπΆπΈπΈ,STβˆ’S (𝑒𝑒𝑐𝑐𝑒𝑒) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ ecg βˆ’ 0.65 . 05 , 1οΏ½ , 0οΏ½οΏ½ 7 Diagnosis Heart Disease (DHD) πœ‡πœ‡π·π·π»π»π·π·,Negative (π‘‘π‘‘β„Žπ‘‘π‘‘) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½1, 0.28 βˆ’ π‘‘π‘‘β„Žπ‘‘π‘‘ . 03 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ DHD,BorderLine(π‘‘π‘‘β„Žπ‘‘π‘‘) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ π‘‘π‘‘β„Žπ‘‘π‘‘ βˆ’ 0.25 0.3 , 1, 0.58 βˆ’ π‘‘π‘‘β„Žπ‘‘π‘‘ 0.8 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡ DHD,Positive(π‘‘π‘‘β„Žπ‘‘π‘‘) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ π‘‘π‘‘β„Žπ‘‘π‘‘ βˆ’ 0.50 0.8 , 1, 0.82 βˆ’ π‘‘π‘‘β„Žπ‘‘π‘‘ 0.7 οΏ½ , 0οΏ½οΏ½ πœ‡πœ‡π·π·π»π»π·π·,StronglyPositive (π‘‘π‘‘β„Žπ‘‘π‘‘) = οΏ½π‘šπ‘šπ‘Žπ‘Žπ‘šπ‘š οΏ½π‘šπ‘šπ‘šπ‘šπ‘šπ‘šοΏ½ dhd βˆ’ 0.75 . 07 , 1οΏ½ , 0οΏ½οΏ½ 3.5. Graphical Representation of Membership Function: The Proposed DHD-MFI expert system I/O variables graphical membership functions are shown in table 4. Table 4. Proposed DHD-MFI Graphical MF representation of I/O variable Sr. No. Input Variables Graphical Representation of Membership Functions 1 Age (Year) Β΅Age (a) 2 Blood Pressure BP Systolic Iftikhar Naseer et al. EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 5 (mm Hg) Β΅BPS (bp) 3 Cholesterol mg/dL (milligrams per deciliter) Β΅LDL (ch) 4 Diabetic (HbA1c) Β΅Diabetic (d) 5 Chest Pain Β΅Chest Pain(cp) 6 ECG (Electro cardio graphy) (mV) Β΅ECG(ecg) 7 Diagnosis Heart Disease 3.6. Fuzzy Proposition: Fuzzy proposition for the proposed Diagnosis Heart Disease-MFI expert System is: t: a x bp x c x d x cp x ecg β†’ DHD (2) where a, bp, c, d, cp, ecg & dhd represents Age, Blood Pressure Systolic, Cholesterol, Diabetic, Chest Pain, Electrocardiography and Diagnosis Heart Disease respectively. All input and output parameter values are mapped from real range to probability ranges because the fuzzy expert system works on probability range 0-1 [20, 21]. Hence, the function t-Norm in equation (2) is defined as: t: [0,1]x [0,1]x [0,1]x [0,1]x [0,1]x [0,1] β†’ [0,1] (3) Membership function of Diagnosis Heart Disease can be written as: πœ‡πœ‡π·π·π»π»π·π·(π‘‘π‘‘β„Žπ‘‘π‘‘) = 𝑑𝑑[πœ‡πœ‡π΄π΄(π‘Žπ‘Ž), πœ‡πœ‡π΅π΅π΅π΅(𝑏𝑏𝑏𝑏), πœ‡πœ‡πΆπΆ(𝑐𝑐), πœ‡πœ‡π·π·(𝑑𝑑), πœ‡πœ‡πΆπΆπ΅π΅(𝑐𝑐𝑏𝑏), πœ‡πœ‡π‘’π‘’π‘’π‘’π‘’π‘’(𝑒𝑒𝑐𝑐𝑒𝑒)] = minοΏ½πœ‡πœ‡π΄π΄(π‘Žπ‘Ž), πœ‡πœ‡π΅π΅π΅π΅(𝑏𝑏𝑏𝑏), πœ‡πœ‡πΆπΆ(𝑐𝑐), πœ‡πœ‡π·π·(𝑑𝑑), πœ‡πœ‡πΆπΆπ΅π΅(𝑐𝑐𝑏𝑏), πœ‡πœ‡π‘’π‘’π‘’π‘’π‘’π‘’(𝑒𝑒𝑐𝑐𝑒𝑒)οΏ½ (4) 3.7 Rule Base: The proposed Diagnosis Heart Disease-Mamdani Fuzzy Inference expert system consists of 6 inputs and 1 output which makes 729 all possible fuzzy rules. The fuzzy rules are developed with the help of medical experts/practitioners. Some fuzzy rules of the proposed system are shown below. Conditional statement IF-THEN fuzzy rules are applied to the membership functions. These IF-THEN rules are part of the fuzzy rule base. Rules surface, rules viewer, etc. are depending upon fuzzy rule base. The fuzzy rule base of our expert system has 729 rules. Rules are denoted by Rdhd n , where 1 ≀ n ≀ 729. 𝑹𝑹𝒅𝒅𝒅𝒅𝒅𝒅 𝟏𝟏 = IF Age is Young AND Blood Pressure is Normal AND Cholesterol is optimal AND Diabetic is controlled AND Chest Pain is Non-Cardiac AND ECG is Non- Significant THEN Diagnosis Heart Disease is Negative. 𝑹𝑹𝒅𝒅𝒅𝒅𝒅𝒅 𝟐𝟐 = IF Age is Young AND Blood Pressure is High AND Cholesterol is optimal AND Diabetic is controlled AND Chest Pain is Non-Cardiac AND ECG is ST- Segment Depression THEN Diagnosis Heart Disease is Positive. 𝑹𝑹𝒅𝒅𝒅𝒅𝒅𝒅 πŸ‘πŸ‘ = IF Age is Young AND Blood Pressure is low AND Cholesterol is optimal AND Diabetic is controlled AND Chest Pain is Non-Cardiac AND ECG is ST- Segment Elevation THEN Diagnosis Heart Disease is Strongly Positive. 𝑹𝑹𝒅𝒅𝒅𝒅𝒅𝒅 πŸ’πŸ’ = IF Age is Old AND Blood Pressure is high AND Cholesterol is optimal AND Diabetic is well controlled AND Chest Pain is Non-Cardiac AND ECG is ST- Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 6 Segment Depression THEN Diagnosis Heart Disease is Positive. . . . 𝑹𝑹𝒅𝒅𝒅𝒅𝒅𝒅 πŸ•πŸ•πŸπŸπŸ•πŸ• = IF Age is old And Blood Pressure is Very High And Cholesterol is above normal AND Diabetic is uncontrolled AND Chest Pain is typical AND ECG is ST-Segment Elevation THEN Diagnosis Heart Disease is Strongly Positive. 3.8 Fuzzy Inference Engine: The fuzzy inference engine is the method towards representing an offered contribution to a yield utilizing fuzzy logic [20, 21]. Membership functions, fuzzy logic operators and IF-Then rules are an important part of the Fuzzy Inference Engine [21]. All rules in the fuzzy rule base are combined into a single fuzzy relation that lies under the inner product on the input universe of discourse, which is then viewed as an only fuzzy IF-THEN rule. A suitable operator for combining the rules is union. Let RDHD n be a fuzzy relation that represents fuzzy IF- THEN rule of the proposed expert system which is, 𝑅𝑅𝐷𝐷𝐻𝐻𝐷𝐷 𝑛𝑛 = 𝐴𝐴𝑛𝑛 x 𝐡𝐡𝐡𝐡𝑛𝑛 x 𝐢𝐢𝑛𝑛 x 𝐷𝐷𝑛𝑛 x 𝐢𝐢𝐡𝐡𝑛𝑛 x 𝐸𝐸𝐢𝐢𝐸𝐸𝑛𝑛 β†’ 𝐷𝐷𝐷𝐷𝐷𝐷𝑛𝑛 The above equation can be written as πœ‡πœ‡π΄π΄βˆ©π΅π΅π΅π΅βˆ©πΆπΆβˆ©π·π·βˆ©πΆπΆπ΅π΅βˆ©πΈπΈπΆπΆπΈπΈ(π‘Žπ‘Ž, 𝑏𝑏𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑐𝑐𝑏𝑏, 𝑒𝑒𝑐𝑐𝑒𝑒) = πœ‡πœ‡π΄π΄(π‘Žπ‘Ž) ∩ πœ‡πœ‡π΅π΅π΅π΅(𝑏𝑏𝑏𝑏) ∩ πœ‡πœ‡πΆπΆ(𝑐𝑐)) ∩ πœ‡πœ‡π·π·(𝑑𝑑)) ∩ πœ‡πœ‡πΆπΆπ΅π΅(𝑐𝑐𝑏𝑏)) ∩ πœ‡πœ‡πΈπΈπΆπΆπΈπΈ(𝑒𝑒𝑐𝑐𝑒𝑒) The rules of the proposed system are interpreted as a single fuzzy relation defined by 𝑅𝑅729 = ⋃ 𝑅𝑅𝐻𝐻 𝑛𝑛729 𝑛𝑛=1 (5) This combination of rules is called a Mamdani combination. Assume iφΡ and Ξ¨ be input and output fuzzy sets respectively. We obtain the output of the fuzzy inference engine as πœ‡πœ‡π‘π‘π‘’π‘’π‘’π‘’π‘π‘π‘π‘π‘π‘π‘π‘π‘’π‘’ βˆ©π΅π΅π΅π΅π΅π΅π΅π΅π‘’π‘’π΅π΅π΅π΅π‘π‘π‘›π‘›π‘’π‘’ βˆ©π΅π΅π΅π΅π‘ƒπ‘ƒπ‘π‘π‘π‘π‘π‘π‘π‘π‘’π‘’ βˆ©π΅π΅π‘π‘π΅π΅π΅π΅π‘›π‘›π‘’π‘’π΅π΅π‘†π‘†π΅π΅π΅π΅π‘ƒπ‘ƒπ‘π‘π‘π‘π‘π‘π‘π‘π‘’π‘’(πœƒπœƒ) = 𝑆𝑆𝑆𝑆𝐡𝐡𝑁𝑁 πœ–πœ– (𝐴𝐴,𝐡𝐡𝐡𝐡,𝐢𝐢,𝐷𝐷,𝐢𝐢𝐡𝐡,𝐸𝐸𝐢𝐢𝐸𝐸)𝑑𝑑[𝑏𝑏𝑁𝑁, 𝑙𝑙] (6) Where, 𝑏𝑏𝑁𝑁 = Β΅i(a, bp, ch, d, cp, ecg) And 𝑙𝑙 = Β΅729(a, bp, ch, d, cp, ecg, DHD) 3.9 Product Inference Engine: The Product Inference Engine (PIE) of the proposed Diagnosis Heart Disease-MFI expert system can be written as πœ‡πœ‡πœƒπœƒ(Diagnosis Heart Disease) = max 1≀𝑛𝑛≀729 �𝑆𝑆𝑆𝑆𝐡𝐡𝑁𝑁 πœ–πœ– (𝐴𝐴,𝐡𝐡𝐡𝐡,𝐢𝐢,𝐷𝐷,𝐢𝐢𝐡𝐡,𝐸𝐸𝐢𝐢𝐸𝐸) οΏ½οΏ½(𝐸𝐸) 729 𝑗𝑗=1 , 𝐽𝐽𝑁𝑁 οΏ½οΏ½ (7) Where, 𝐸𝐸 = ¡𝐴𝐴,𝐡𝐡𝐡𝐡,𝐢𝐢,𝐷𝐷,𝐢𝐢𝐡𝐡,𝐸𝐸𝐢𝐢𝐸𝐸(π‘Žπ‘Ž, 𝑏𝑏𝑏𝑏, 𝑐𝑐, 𝑑𝑑, 𝑐𝑐𝑏𝑏, 𝑒𝑒𝑐𝑐𝑒𝑒) And 𝐽𝐽𝑁𝑁 = ¡𝐴𝐴1𝑁𝑁,𝐴𝐴2𝑁𝑁,𝐴𝐴3𝑁𝑁,𝐴𝐴4π‘π‘οΏ½π‘Žπ‘Ž1,π‘Žπ‘Ž2,π‘Žπ‘Ž3,π‘Žπ‘Ž4,οΏ½ 3.10 De-fuzzifier: Defuzzifier is known for generating a quantifiable inference in crisp logic on the basis of fuzzy sets and corresponding membership degree [20, 21]. It is supposed to be the vital need that is fulfilled for the proper fuzzy control system. Defuzzifier is one of the definitive crucial parts of a fuzzy expert system. In defuzzifier, fuzzy sets converted into the crisp output. Centre of gravity defuzzifier, the center of average defuzzifier and maximum defuzzifier are three sorts of defuzzifier [12, 13]. The important defuzzifier amongst them is the center of gravity defuzzifier is used in the proposed DHD-MFI expert system. The center of gravity is taken as a useful defuzzifier technique. The center of gravity defuzzifier specifies the Ξ΄βˆ— as the center of the area covered by the membership function of Ξ΄ that is Ξ΄βˆ— = βˆ«πœƒπœƒπœ‡πœ‡πœƒπœƒπœƒπœƒπ‘‘π‘‘πœƒπœƒ βˆ«πœ‡πœ‡πœƒπœƒ πœƒπœƒπ‘‘π‘‘πœƒπœƒ (8) The graphical representation of defuzzifier of the proposed Diagnosis Heart Disease-MFI expert system is shown in fig 3 & 4. Iftikhar Naseer et al. EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 7 Fig. 3. Proposed DHD-MFI expert system Rule surface of w.r.t. ECG & Diabetic. Fig. 3 demonstrates the output of the diagnosis of heart disease based on ECG (X-axis) and Diabetic (Y-axis). It shows that if ECG having values between 0-0.3 and Diabetic values 0-0.5 then there is no chance of Heart Disease. If ECG values greater than 0.3-0.65 and Diabetic values 0.5-0.75 then heart disease is positive. If ECG values 0.65-1 and Diabetic values 0.75 – 1 then Diagnosis Heart Disease is strongly positive. Fig. 4. Proposed DHD-MFI expert system Rule surface of w.r.t. Chest Pain & ECG. Fig. 4 displays the output of the diagnosis of heart disease consists of Chest Pain and ECG. If the Chest Pain is non- cardiac (0- 0.3) and ECG is non-significant (0-0.3) then there is no chance of a diagnosis of heart disease. If Chest Pain is atypical or typical and ECG is non-significant then heart disease diagnoses borderline. All values (non- cardiac, atypical, typical) of Chest Pain and ECG ST- Segment Depression then heart disease level on positive. All values (non-cardiac, atypical, typical) of Chest Pain and ECG ST-Segment Elevation then heart disease level on strongly positive. 4. Outcomes Figure 5 shows the accuracy of the proposed DHD-MFI expert system which is plotted after the comparison of predicted proposed system outcomes with human experts. The proposed DHD-MFI expert system has shown 93% accuracy along with the minor probability of error 7% in picking Negative cases. In the same way, this system has selected 94% borderline cases accurately with the probability of error 6%. Furthermore, it is seen that 96% positive cases are accurately identified with the probability of error 4%. Whereas, 94% strongly positive cases are chosen accurately by the system with the probability of error 6%. Finally, the overall efficiency of the system is found 94% and the probability of error is 6%. Fig. 5. Accuracy Chart of Proposed DHD-MFI expert system 5. Discussion The primary objective of the present study to design a comprehensive expert system for heart disease diagnosis by test reports taken from the Cardiac Department of Punjab Institute of Cardiology Hospital, Lahore. Pakistan. The efficiency of the proposed method is randomly checked on 280 records. Negative results obtained from 70 samples in which 5 were wrong. The probability of correctness and error was 0.93 and 0.07 respectively. The probability of correctness and error was 0.94 and 0.06 Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 8 respectively while taking 70 samples of Borderline in which 4 are incorrect. From 70 Positive results out of which 3 are incorrect providing probability of correctness and error 0.96 and 0.04 respectively and 70 from Strong Positive 0.94 and 0.06 was the probability of correctness and error. Cumulative probability of correctness was 0.94 obtained from the proposed system and probability of error was 0.06.The proposed expert system is basic and simple to use for both medical experts and non- professional. The main goal of this explorative research is to analyze the various degrees of Heart illness. 6. Conclusion The precision of the proposed Diagnosis Heart Disease- Mamdani Fuzzy Inference expert system is 94%. The efficacy of DHD-MFI expert system in the Pakistani context has provided a unique perception of scale in terms of the impact of six variables in driving heart complexity. When the results of the DHD-MFI expert system are shared with the heart experts, they found them very much helpful in making a decision regarding the level of heart disease. On these bases, the proposed system has provided a novelty of strength and support in the treatment and diagnosis of cardiovascular ailments. 7. Future Work The present research work has opened new avenues for future researchers in the field of heart diagnosis. This can be possible by improving the more correctness and accuracy of the proposed system with the help of the neural network, neuro-fuzzy, swarm intelligence and evolutionary computing. The present work can likewise be reached out to another better and reliable treatment (arrangement) of heart diseases like Echocardiogram, Angiograph, and Bypass Surgery. References 1. Atta, A., Abbas, S., Khan, M. A., Ahmed, G., & Farooq, U. (2018). An adaptive approach: Smart traffic congestion control system. Journal of King Saud University-Computer and Information Sciences. 2. Iqbal, K., Khan, M. A., Abbas, S., Hasan, Z., & Fatima, A. (2018). Intelligent Transportation System (ITS) for Smart-Cities using Mamdani Fuzzy Inference System. INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 9(2), 94-105. 3. Hassan, A., Bilal, H. M., Khan, M. A., Khan, M. F., Hassan, R., & Farooq, M. S. (2018, October). Enhanced Fuzzy Resolution Appliance for Identification of Heart Disease in Teenagers. In International Conference on Intelligent Technologies and Applications, Springer, Singapore, 28-37. 4. Kasbe, T., & Pippal, R. S. (2017, August). Design of heart disease diagnosis system using fuzzy logic. In 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS) (pp. 3183-3187). IEEE. 5. Aliza dehsani, R., Zangooei, M. H., Hosseini, M. J., Habibi, J., Khosravi, A., Roshanzamir, M & Nahavandi, S. (2016). Coronary artery disease detection using computational intelligence methods. Knowledge-Based Systems, 109, 187- 197. 6. Mahdi, M., Faisal, I., Shakir, M.M., Praveen, S., & Aqilah, B. H. (2019). Fuzzy Logic System for Diagnosing Coronary Heart Disease. International Journal of Engineering & Technology, 8 (1.7), 119-125. 7. Adeli, A., & Neshat, M. (2010, March). A fuzzy expert system for heart disease diagnosis. In Proceedings of International Multi Conference of Engineers and Computer Scientists, Hong Kong (Vol. 1, pp. 28-30). 8. Anooj, P. K. (2012). Clinical decision support system: Risk level prediction of heart disease using weighted fuzzy rules. Journal of King Saud University-Computer and Information Sciences, 24(1), 27-40. 9. Hassan, N., Sayed, O. R., Khalil, A. M., & Ghany, M. A. (2017). Fuzzy soft expert system in prediction of coronary artery disease. International Journal of Fuzzy Systems, 19(5), 1546-1559. 10. Akinyokun, O. C., Babatunde, I. G., Arekete, S. A., & Samuel, R. W. (2015). Fuzzy logic-driven expert system for the diagnosis of heart failure disease. Artif. Intell. Research, 4(1), 12-21. 11. Bhatla, N., & Jyoti, K. (2012). A Novel Approach for heart disease diagnosis using Data Mining and Fuzzy logic. International Journal of Computer Applications, 54(17). 12. Ahmad, G., Khan, M. A., Abbas, S., Athar, A., Khan, B. S., & Aslam, M. S. (2019). Automated Diagnosis of Hepatitis B Using Multilayer Mamdani Fuzzy Inference System. Journal of healthcare engineering, 2019. 13. Zahra, S. B., Athar, A., Khan, M. A., Abbas, S., & Ahmad, G. (2019). Automated diagnosis of liver disorder using multilayer neuro- fuzzy. International Journal Of Advanced And Applied Sciences, 6(2), 23-32. 14. AsadUllah, M., Khan, M. A., Abbas, S., Athar, A., Raza, S. S., & Ahmad, G. (2018). Blind Channel and Data Estimation Using Fuzzy Logic-Empowered Opposite Learning-Based Iftikhar Naseer et al. EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 9 Mutant Particle Swarm Optimization. Computational Intelligence and Neuroscience, 2018. 15. Khan, M. A., Umair, M., & Choudhry, M. A. S. (2015). GA based adaptive receiver for MC- CDMA system. Turkish Journal of Electrical Engineering & Computer Sciences, 23(Sup. 1), 2267-2277. 16. Umair, M., Khan, M. A., &Choudry, M. A. S. (2013, January). GA backing to STBC based MC-CDMA systems. In Intelligent Systems Modelling & Simulation (ISMS), 2013 4th International Conference on (pp. 503-506). IEEE 17. Anwar Saeed, Muhammad Yousif, Areej Fatima, Sagheer Abbas, Muhammad Adnan Khan, Leena Anum & Ali Akram. (2019). An Optimal Utilization of Cloud Resources using Adaptive Back Propagation Neural Network and Multi-Level Priority Queue Scheduling. The ISC International Journal of Information Security (ISeCure). 11(special issue), 145-151. doi: 10.22042/isecure.2019.11.0.19. 18. Sagheer Abbas, Tahir Alyas, Atifa Athar, Muhammad Adnan Khan, Areej Fatima & Waseem Ahmed Khan. (2019). Ranking of Cloud Services by measuring multiple Parameters using Adaptive Neuro-Fuzzy Inference System, EAI Endorsed Transactions on Scalable Information Systems, 18: e5, P.1-7, doi: 10.4108/eai.13-7-2018.159354. 19. Areej Fatima, Muhammad Adnan Khan, Sagheer Abbas, Muhammad Waqas, Leena Anum & Muhammad Asif. (2019). Evaluation of Planet Factors of Smart City through Multi- layer Fuzzy Logic (MFL). Isecure-Isc International Journal Of Information Security. Volume 11. Special Issue Summer and autumn, pp.51-58, DOI: 10.22042/ISECURE.2019.11. 0.7. 20. Sadaf Hussain, Sagheer Abbas, Tanweer Sohail, Muhammad Adnan Khan & Atifa Athar. (2019). Estimating Virtual Trust of Cognitive Agents using Multi-layered Socio-Fuzzy Inference System” Journal of Intelligent & Fuzzy Systems, vol. Pre-press, no. Pre-press, pp. 1-16. DOI: 10.3233/JIFS-18760. 21. Ayesha Atta, Muhammad Adnan Khan, Sagheer Abbas, Gulzar Ahmad & Areej Fatima,(2019). Modeling Smart Road Traffic Congestion Control System Using Machine Learning Techniques, Neural Network World, 19(2), 99- 110. DOI: 10.14311/NNW.2019.29.008. Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System EAI Endorsed Transactions on Scalable Information Systems 03 2020 - 05 2020 | Volume 7 | Issue 26 | e3 http://dx.doi.org/10.4108/eai.13-7-2018.159354 Abstract 1. Introduction 2. Related Work 3. Research Methodology 4. Outcomes 5. Discussion 6. Conclusion 7. Future Work References