key: cord-0677553-lj044b9l authors: Asl, Ali Akbar Sadat; Ershadi, Mohammad Mahdi; Sotudian, Shahabeddin title: Fuzzy Expert Systems for Prediction of ICU Admission in Patients with COVID-19 date: 2021-04-22 journal: nan DOI: nan sha: d3baac0c83808d39a3b3c42a31ef1e0dc51221bf doc_id: 677553 cord_uid: lj044b9l The pandemic COVID-19 disease has had a dramatic impact on almost all countries around the world so that many hospitals have been overwhelmed with Covid-19 cases. As medical resources are limited, deciding on the proper allocation of these resources is a very crucial issue. Besides, uncertainty is a major factor that can affect decisions, especially in medical fields. To cope with this issue, we use fuzzy logic (FL) as one of the most suitable methods in modeling systems with high uncertainty and complexity. We intend to make use of the advantages of FL in decisions on cases that need to treat in ICU. In this study, an interval type-2 fuzzy expert system is proposed for prediction of ICU admission in COVID-19 patients. For this prediction task, we also developed an adaptive neuro-fuzzy inference system (ANFIS). Finally, the results of these fuzzy systems are compared to some well-known classification methods such as Naive Bayes (NB), Case-Based Reasoning (CBR), Decision Tree (DT), and K Nearest Neighbor (KNN). The results show that the type-2 fuzzy expert system and ANFIS models perform competitively in terms of accuracy and F-measure compared to the other system modeling techniques. or Coronavirus has affected the public health and economics of many countries in the world due to its contagious nature and lack of effective medicine or vaccine [1] . It has spread to over 50 million people worldwide by the end of September 2020. According to medical reports, the mortality rate associated with this virus is low. However, the long duration of the disease and the disability of patients for a long time cause further spread of the disease and thus increase the mortality associated with this disease. It has killed over 1200000 people by the end of September 2020 [2] . It is noteworth † y that many COVID-19 patients will develop mild to moderate illness and recover without hospitalization. Fever, dry cough, and tiredness are the most common symptoms of COVID-19. These patients are advised to manage their symptoms at home. On the other hand, serious symptoms such as difficulty breathing and chest pain have appeared in some patients during the disease [3] . This condition can quickly get worse so that an emergency situation occurs. These critical situations can increase human decision-making errors leading to more financial and non-financial losses. Besides, predicting the situation of patients is useful for hospitals and health centers due to the spread of this virus. It can help to design targeted tests of people, predict the number of required resources in hospitals and health centers, and inform medical plans for prioritizing the level of care, design-related policy about vaccination, and so on. [4, 5] . In this way, health centers and hospitals can appropriately allocate their limited resources including treatment in intensive care units (ICUs), tests, and ventilators to the patients. Therefore, to prevent human decision-making errors and to properly allocate the limited resources, it is a rational idea to design an expert system for the prediction of resource utilization in patients with COVID-19. In this study, the COVID-19 patient pre-condition dataset provided by the Mexican government is used [6] . To the best of our knowledge, for the first time, a fuzzy expert system is designed for the prediction of a problem related to the COVID-19 patients. In addition to developing a type-2 fuzzy expert system, an adaptive neuro-fuzzy inference system and some classification methods such as NB, CBR, DT, and KNN are implemented. Finally, we compare the results of these techniques in terms of accuracy and F-measure. The structure of this paper is as follows: a literature review of different expert systems for medical diagnosis is presented in section 2. The steps of designing the type-2 fuzzy expert system are presented in section 3. In section 4, the interval type-2 fuzzy expert system for ICU admission is presented. Classification methods and the developed fuzzy expert systems are evaluated in section 5. Finally, conclusions and some directions for future studies are considered in section 6. In this section, published research of Web of Science between the years 1980 and 2020 about the "COVID-19" or "Coronavirus" and "fuzzy expert systems" are analyzed using VOSviewer 1.6.10 software, and the corresponding results are presented in Figure 1 . Different circles show a different number of articles and the larger circles are associated with more articles. The lines between circles show the relationships among their articles in terms of their references. Besides, VOSviewer 1.6.10 software clusters different circles into six colored clusters according to their relationships. Figure 2 shows the results according to the year of the published articles. According to the published research of Web of Science, a search with "COVID-19" or "Coronavirus" or other equivalent terms found more than 65000 results. Besides, "expert systems" is appeared in more than 23000 papers. However, no paper presents a fuzzy expert system for COVID-19 or Coronavirus. It demonstrates a serious gap due to the importance of the COVID-19 epidemic and the application of expert systems for diagnosis. Therefore, in this paper, we are going to fill this gap by designing fuzzy expert systems for the prediction of ICU admission in COVID-19 patients. Thanks to the importance of expert systems, many researchers have used them in medical fields for the diagnosis of various diseases. For example, Hamedan et al. proposed a fuzzy expert system to predict chronic kidney disease. In their work, first, they identified the diagnostic parameters and risk factors through a literature review and a survey of some nephrologists, then a set of fuzzy rules for the prediction of chronic kidney disease was determined [26] . In another study, Hussain et al. presented a multi-layered fuzzy Mamdani inference system to analyze the prevailing thyroid disease. In their study, the proposed expert system is based on two layers. In layer 1, the presence or absence of thyroid disease is diagnosed. If layer 1 indicates the presence of thyroid disease, then layer 2 is activated by which the type of thyroid disease is determined [27] . Khalil et al. developed a new fuzzy soft expert system to predict lung cancer disease by using weight loss, shortness of breath, chest pain, persistent cough, blood in sputum, and age of patients. In their work, a prediction of the fuzzy soft expert system is composed of four main steps: 1) Transforming real-valued inputs into fuzzy numbers. 2) Converting fuzzy numbers into fuzzy soft sets. 3) Reducing the family of fuzzy soft sets obtained to a new family of fuzzy soft sets. 4) Using the proposed method to get the output data [28] . Mahanta and Panda developed a fuzzy expert system for the prediction of prostate cancer. In their study, age, prostate-specific antigen (PSA), prostate volume (PV), and Free PSA (FPSA) are fed as inputs into the system, and prostate cancer risk (PCR) is obtained as the output [29] . Mirmozaffari et al. presented an expert system for diagnosing the type of gastrointestinal disease and determining the type of tests needed to diagnose the disease [30] . Mojrian et al. presented a method based on a multilayer fuzzy expert system for the detection of breast cancer using an extreme learning machine (ELM) classification model integrated with radial basis function (RBF) kernel called ELM-RBF. In this study, they showed that their proposed method outperforms the linear-SVM model [31] . In another study, Naseer et al. proposed a fuzzy expert system for the diagnosis of heart disease. In their proposed system, the input variables comprised of age, chest pain, electrocardiography, blood pressure systolic, diabetes, and cholesterol are transmitted with the help of fuzzy rules which are framed in the light of low, normal, high, and very high intensity and the output is obtained using the Mamdani Inference method diagnosing the heart disease [32] . Siddiqui et al. developed an adaptive hierarchical Mamdani fuzzy expert system for the detection of arthritis. In their research, the expert system is comprised of two layers. In the first layer, the input variables are rest pain, morning stiffness, body pain, joint infection, swelling, redness, past injury and age that detects output condition of arthritis to be normal, infection and/or other problem, and in the second layer, the type of arthritis is diagnosed [33] . Table 1 summarizes the fuzzy expert systems proposed for the diagnosis of various types of diseases. As mentioned earlier, the main objective of this paper is to design an expert system to predict ICU needs for COVID-19 patients based on type-2 FL. To this end, there are two common approaches for the selection of the parameters of a type-2 FL system. The first one is the partially dependent approach. In this approach, first, the best possible type-1 FL system is designed. Then, it is used to initialize the parameters of a type-2 FL system. The second one is the totally independent approach where all of the parameters of the type-2 FL system are tuned without using an existing type-1 design [36] . In this paper, we use the partially dependent approach because of its advantages compared with the totally dependent approach. After designing type 1 fuzzy system, a type-2 rule based fuzzy system with uncertain standard deviation and interval-valued membership function is implemented. The same rules of the type-1 fuzzy system are used by this system and the only difference is that if-part and then-part are type-2. The designed system is comprised of the following steps:  Data preprocessing and determining the inputs and output of the system;  Clustering the output space and determination of the number of rules;  Projection of membership functions of the output onto the inputs to obtain the membership values of the inputs;  Tuning the parameters of type-1 membership functions of inputs and output variables;  Transforming type-1 to interval type-2 membership functions;  Tuning the parameters of type-2 membership functions. We use a publicly available dataset, containing information of about 566602 patients. The data contains some information about pregnancy, diabetes, chronic obstructive pulmonary disease (COPD), asthma, cardiovascular, obesity, tobacco, etc. and determines whether a patient needs an ICU or not [6] . In this dataset, there are 444814 missing data for ICU. Therefore, the final number of patients used in fuzzy expert systems and other classification techniques is 121788. Besides, a few outliers (e.g., male patient's pregnancy) were detected and removed from the dataset. Most precondition features of this dataset are categorical, each of which takes the value yes, no, and unspecified. These categorical features were converted to numerical by 'one-hot' encoding. By creating auxiliary variables that help differentiate between various categories of a feature, one-hot encoding transforms the categorical feature to multiple binary variables. Finally, highly correlated variables were eliminated as they provide similar information. Specifically, we calculated pairwise correlations among the variables and one among any two highly correlated variables with an absolute correlation coefficient higher than 0.85 was removed. After the preparation of the dataset, we reached 27 features, with one output determines whether a patient need to the ICU or not. To determine the number of rules, we use Fukuyama cluster validity index which can be defined as follows [37] : (1) where = {x 1 , x 2 , … , x N } ⊆ ℝ is the dataset in d-dimensional vector space, u ij is the degree of belonging of the j th data to the i th cluster, = {v 1 , v 2 , … , v c } is the prototypes of clusters, c is the number of clusters, v ̅ = ∑ v i c , m is the degree of fuzziness, U is fuzzy partition matrix, and N is the number of samples. By solving min 2≤c≤C V FS , the optimal cluster number is obtained. In this study, this cluster validity index was implemented and the optimal value for the number of clusters is obtained five clusters. Therefore, we have five rules in our system. In the proposed system, Mamdani inference system is used where the antecedents and consequents of the rule-based system are fuzzy sets. We clustered the output data and then obtained the output clusters' primary membership grades using Sugeno and Yasukawa method [38] . First, we partition the output space, and then, get the input space clusters by projecting the output space partition to each input variable space. For the input variables, the appropriate membership grades should be calculated after clustering the output space. One way is to set each input's membership grade equal to its corresponding output membership grade obtained by the procedure of output data clustering. In this way, for each output data, all the related input variables would then have a similar membership grade. The issue with this approach is that the membership functions are not convex and a further approximation is required to form the convex membership functions. Furthermore the output membership grade is not always the same as the input membership grades at each sample point [39] . For these reasons, in this paper, Zarandi's approach is used. According to this approach, first, the ranges in which the membership functions of the input variable adopt value 1 are determined. The data points are then classified using GK method, by given m and c determined in the preceding step (obtained from output variable clustering stage) and analyzing the objective function of classification algorithm (for more details please refer to [39] ). There are several parameters in type-1 FL systems that can either be pre-specified or can be tuned during a training phase. An impeccable FL system should have ( ) = , where d is the desired output. However, there are typically errors between the desired and actual output. Therefore, in order to produce better results, tuning the parameters of the fuzzy model is important. In this paper, the suggested tuning algorithm by Liang and Mendel is used. Based on this approach, all of the parameters related to a Gaussian type-1 are tuned using the steepest-descent method. Given an input-output training pair ( ( ) , ( ) ), ( ) ∈ and ( ) , a type-1 fuzzy is designed by minimizing the following error function [40] : To transform type-1 to an interval type-2 fuzzy set with uncertain standard deviation, the case of a Gaussian primary membership function with a fixed mean and uncertain standard deviation that takes on values in [ 1 , 2 ] is considered [40] : where = 1, … , ; is number of antecedent; = 1, … , ; and is number of rules. We can obtain the upper and lower membership functions by replacing 2 and 1 with in the above expression. For tuning the parameters of the interval type-2 FL system, we use the proposed tuning algorithm by Liang and Mendel. In interval type-2 system, ( ) is determined by upper and lower membership functions and centroids of interval type-2 fuzzy sets, and therefore, we want to tune these parameters. Since an interval type-2 FL system can be identified by two fuzzy basis function expansions, we can focus on tuning the parameters of just these two type-1 FL systems [41] . In this paper, we use Mamdani inference system in which the antecedents and consequent are type-2 fuzzy sets which have a fixed mean and an uncertain standard deviation that takes values in an interval. The interval type-2 FL system is created from the type-1 FL system. The proposed system uses singleton fuzzification, product t-norm, product inference, and center-of-sets type-reduction, with the same number of fuzzy sets and rules as the type-1 FL system. Several defuzzification methods have been used, such as centroid, bisector, and Yager. The best results of this system is obtained by Yager defuzzification method. Figure 3 demonstrates the rule based and inference mechanism for the proposed interval type-2 fuzzy system. In this paper, in addition to developing a type-2 fuzzy expert system for prediction of ICU admission, we develop the ANFIS model for this prediction task using MATLAB toolbox. Then, we compare the performance of the developed fuzzy expert systems to several well-known classification methods such as NB, CBR, DT, and KNN in terms of accuracy and F-measure. To evaluate the performance of each system, the dataset is divided into training and test sets. In this way, for each system modeling technique, 70% of the dataset has been used for training. Table 2 shows the accuracy and F-measure of different system modeling techniques implemented in this study. Classification accuracy is the total number of accurate predictions divided by the total number of predictions made for a dataset. As a performance measure, accuracy is not sufficient for imbalanced classification problems. The key explanation is that the vast number of examples from the dominant class or classes would overwhelm the number of minority class examples. Using precision and recall metrics is an alternative to using classification accuracy. F-Measure integrates both precision and recall into a single measure and captures both properties [42] . As can be seen in Table 2 , the developed fuzzy expert systems could achieve an accuracy of 91.6% and an F-measure of 95.6%. Comparing to the CBR and KNN methods, the fuzzy expert systems can improve the accuracy and F-measure by about 1.5% to 5% and 1% to 3%, respectively. Furthermore, the developed fuzzy models performed competitively compared to the other classification methods. Overall, the results show that both type-2 fuzzy system and ANFIS model could outperform the well-known classification methods. Type-2 FL systems usually give better results than their type-1 counterparts as the type-2 fuzzy sets and systems generalize type-1 fuzzy sets and systems so that more uncertainty can be handled. However, in our case, as can be seen, the results of the type-2 fuzzy expert system are very close to the ANFIS model. In the dataset, as most input variables are categorical, the type-2 fuzzy sets lost its efficiency. Therefore, in this specific problem, type-2 FL has lost its superiority over the developed ANFIS model. In this study, a type-2 fuzzy expert system and an adaptive neuro-fuzzy inference system are developed for the prediction of ICU admission. Furthermore, to evaluate the performance of these fuzzy systems, several classification methods such as NB, CBR, DT, and KNN are also implemented. All these methods are tested on a publicly available dataset. The results demonstrate the efficacy of the proposed fuzzy expert systems, with an accuracy of 91.6% and an F-measure of 95.6%, which outperform the other conventional classification techniques. When comparing the two developed fuzzy expert systems, we can notice that the results of the type-2 fuzzy expert system are very close to the ANFIS model since, in our problem, most input variables are categorical. Over time, more datasets will be published related to the COVID-19 disease because more and more tests are performed every day for this disease. Therefore, for future studies, the proposed fuzzy expert systems can be evaluated over some other datasets. As mentioned earlier, in this study, the type-2 FL has lost its superiority over the type-1 fuzzy model as most of the input variables are categorical. If the number of continuous input variables in new datasets is higher, the type-2 fuzzy expert system may provide better results due to its higher generalizability. COVID-ABS: An agentbased model of COVID-19 epidemic to simulate health and economic effects of social distancing interventions World Health Organization Real-time tracking of self-reported symptoms to predict potential COVID-19. Nature medicine ElHealth: Using Internet of Things and data prediction for elastic management of human resources in smart hospitals From data to predictions and decisions: Enabling evidence-based healthcare. Computing Community Consortium From Type-I to Type-II fuzzy system modeling for diagnosis of hepatitis Neuro-fuzzy hybrid model for the diagnosis of blood pressure. InNature-Inspired Design of Hybrid Intelligent Systems Development of a fuzzy expert system for the nephropathy control assessment in patients with type 2 diabetes mellitus. Expert Systems with Applications A type-2 fuzzy expert system for diagnosis of leukemia An expert system based on fuzzy bayesian network for heart disease diagnosis Design and implementation of a web-based fuzzy expert system for diagnosing depressive disorder A mobile expert system utilizing fuzzy logic for venereal and sexually transmitted diseases On the Problems of Knowledge Acquisition and Representation of Expert System for Diagnosis of Coronary Artery Disease (CAD) A fuzzy inference-fuzzy analytic hierarchy process-based clinical decision support system for diagnosis of heart diseases A new expert system based on fuzzy logic and image processing algorithms for early glaucoma diagnosis Dental diagnosis from X-ray images: an expert system based on fuzzy computing A fuzzy medical diagnostic support system for cardiovascular diseases diagnosis using risk factors Automated diagnosis of hepatitis b using multilayer mamdani fuzzy inference system A Fuzzy Expert System Design for Diagnosis of Skin Diseases Fuzzy logic approach for infectious disease diagnosis: A methodical evaluation, literature and classification Fuzzy Based Integrated Diagnostic System for Neurodevelopmental Disorders A Two-Stage Expert System for Diagnosis of Leukemia Based on Type Developing an expert system for diagnosing liver diseases Web-based Fuzzy Expert System for Diabetes Diagnosis Multilayered rule-based expert system for diagnosing uveitis. Artificial intelligence in medicine Diagnosis of hypothyroidism using a fuzzy rulebased expert system Clinical decision support system to predict chronic kidney disease: A fuzzy expert system approach A Novel Approach for Thyroid Disease Identification Empowered with Fuzzy Logic A new expert system in prediction of lung cancer disease based on fuzzy soft sets. Soft Computing Fuzzy expert system for prediction of prostate cancer. New Mathematics and Natural Computation Presenting an expert system for early diagnosis of gastrointestinal diseases Hybrid Machine Learning Model of Extreme Learning Machine Radial basis function for Breast Cancer Detection and Diagnosis; a Multilayer Fuzzy Expert System Diagnosis Heart Disease Using Mamdani Fuzzy Inference Expert System Diagnosis of arthritis using adaptive hierarchical Mamdani fuzzy type-1 expert system A type-2 fuzzy logic controller for the liquid-level process A New Validity Index for Fuzzy-Possibilistic C-Means Clustering A fuzzy logic based approach to qualitative modeling A type-2 fuzzy rule-based expert system model for stock price analysis Uncertainty, fuzzy logic, and signal processing Interval type-2 fuzzy logic systems: theory and design How to Calculate Precision, Recall, and F-Measure for Imbalanced Classification