Application of Mamdani’s Fuzzy Inference System in the Diagnosis of Pre-eclampsia

Pre-eclampsia is the second of the top three causes of death in pregnant women after bleeding and followed by infection. By knowing the risk factors, early detection of pre-eclampsia in pregnant women needs to be done so that later it can be treated more quickly to prevent further complications. This study aims to design a practical application of a decision-making system for the diagnosis of pre-eclampsia in pregnant women using the Fuzzy Inference System (FIS) method so it can be used efﬁciently and effectively for the early diagnosis of pre-eclampsia. The method used in data analysis is the FIS Mamdani method with defuzziﬁcation using the centroid method. The designed system considers blood pressure and proteinuria as input variables and pre-eclampsia status as output variables. The research results show that the system has 7 . 27% of Mean Absolute Percentage Error (MAPE) value and when comparing the ﬁnal diagnosis of the system and expert diagnoses (doctors) from 20 patients at two hospitals, it was found that the system diagnosis was 100% in accordance with the expert diagnoses


A. INTRODUCTION
Maternal Mortality and Perinatal Mortality Rates in Indonesia is still very high.According to the results of the Inter-Census Population Survey conducted by the Central Bureau of Statistics in 2015, the maternal mortality rate was 305 per 100, 000 live births.When compared to the target that the government wants to achieve in 2010 of 125/100, 000 live births, this figure is still relatively high (Bardja, 2020).Maternal mortality in East Nusa Tenggara in 2017 was 163 per 100, 000 live births (Nassa, 2018), and the Maternal Mortality Rate (MMR) in North Timor Tengah District in 2014 was 137 people.The direct causes of death include pre-eclampsia/eclampsia at 5%, bleeding at 50%, infection at 17%, and other causes at 28% (Yogi et al., 2014).
Pre-eclampsia is a disorder with unknown etiology specifically in pregnant women.This syndrome is characterized by hypertension, and proteinuria that occurs after the 20th week of gestation.Eclampsia is pre-eclampsia which is characterized by seizures pital and Kefamenanu Hospital.The data taken is secondary data in the form of medical record data for measuring blood pressure, checking for proteinuria, and doctors' diagnoses of pre-eclampsia patients from 2021 to 2022.The data is then processed using the Mamdani FIS method with the following steps:

Fuzzification
The process of converting input variables with crisp values into fuzzy-valued variables uses a membership function that has been developed.There are 3 membership function curves that will be used in this study, namely: a. Linearly Increasing Membership Function Definition 1. (Mada et al., 2022) A membership function µ is said to be linearly increasing (on (a, b)) if it can be represented as equation (1), For more details, the geometric shape of this function can be seen in Figure 1(a) b. Linearly Decreasing Membership Function Definition 2. (Mada et al., 2022) A membership function µ is said to be linearly decreasing (on (a, b)) if it satisfies the equation (2), For more details, the geometric shape of this function can be seen in Figure 1 For more details, the geometric shape of this function can be seen in Figure 1(c

Inferencing (Rule Base)
The stage of changing the fuzzy input into fuzzy output by following the IF-AND-THEN rules.Furthermore, at this stage calculations are also carried out for fuzzy decision-making.The Mamdani FIS method is often referred to as the Min-Max method because the process of determining the final decision uses the Min operation and the Max operation.The Min operation is performed to determine the membership value as a result of the operation of two or more sets, often referred to as fire strength or α − predicate by using the AND operator with the equation formulation shown in (4), where i denotes the i-th rule of the combination of rules formed from any data.Next, the Max operation is performed, which is an operation to determine the combination of all existing α − predicates.This operation is performed using the OR operator with the equation defined by (5), with [R i ], i = 1, 2, n stating the number of rules formed from any data.

Deffuzzification
The process of converting back from fuzzy-valued output obtained from inference into crisp-valued output uses the membership function.The process of defuzzification of the Mamdani FIS method in this study uses the Centroid method with the equation defined by (6), After the system design process is complete, then a comparison of the results of the diagnosis is carried out based on processing with the diagnostic system that has been made, and the diagnosis is based on the decision of the expert (doctor) to validate how accurate the diagnostic system that has been made is.

Mean Absolute Percentage Error (MAPE)
Before designing a diagnostic system using the Matlab fuzzy toolbox, we first check the prediction accuracy of the system that has been built, using MAPE through the equation defined by (7), where N = the number of forecasting periods, X t = the true value at time t, X t = the forecasting value at time t.
Overall, the research stages can be seen in Figure 2. Fuzzification Determination of the decision to diagnose pre-eclampsia is based on 2 factors, namely blood pressure, and proteinuria.These two variables then become input variables for the Mamdani FIS diagnostic system.

Input Variable Blood Pressure
Based on (Wantania, 2015) and (Fiano and Purnomo, 2017), the fuzzy set for the blood pressure input variable is divided into 4 sets, namely low blood pressure, normal blood pressure, grade I hypertension, and grade II hypertension.The domains of the 4 fuzzy sets can be seen in the membership function graph presented in Figure 3.  8), ( 9), ( 10), and (11).
where BP = Blood Presure, I-GH = First-Grade of Hypertension, II-GH = Second Grade of Hypertension Input Variable Proteinuria Based on (Pardede et al., 2014) and (Chandra et al., 2020), there are 5 categories to describe the amount of protein in the urine (proteinuria).The five indicators are determined based on the protein precipitate test by heating the urine to a boil (boiling test).This examination is carried out by inserting 10-15 mL of urine into a tube and heating the top of the tube until it boils and then observing changes in the urine sample in the tube.The interpretation of the five indicators is presented in Table 1.Negative (-) No fog 2.
Positive 4 (+4) There are white lumps From here, then a fuzzy set and its domain are formed as presented by the graph of the membership function in Figure 4.  12), ( 13), ( 14), (15), and ( 16).Output Variable Pre-eclampsia Status Because the data on the diagnosis of pre-eclampsia is not quantitative, a measure is needed that represents the status of pre-eclampsia in numbers so that the system can process it.(Masan, 2019) discusses the use of the Poedji Rochjati score to represent the severity of the disease.This score will then be used in determining the fuzzy set for the pre-eclampsia category.There are 4 fuzzy sets for this output variable, non-pre-eclampsia, pre-eclampsia, severe pre-eclampsia type I, and severe preeclampsia type II.The domains for each of these fuzzy sets can be seen in the membership function graph of pre-eclampsia status presented in Figure 5.  17), ( 18), ( 19), and (20).
where NON-PRE = Non Pre-eclampsia, PRE = Pre-eclampsia, SPE-I = Severe Pre-eclampsia Type I, SPE-II = Severe Preeclampsia Type II.Meanwhile, because the results of the medical record only showing proteinuria +3, it is assumed that the degree of membership for proteinuria is µ P +3 (x) = 1.

Example 2
Continuing the calculations in Example 1.Because the blood pressure of patient with the initials K. T. = 143/83 mmHg is in the category of 1st-Grade Hypertension and 2nd-Grade Hypertension while her proteinuria is +3, there are 2 rules that may occur, namely: [R16] IF 1st-Grade Hypertension AND Proteinuria +3 THEN Severe Pre-eclampsia Type I.
Next, with AND operator in (4) we will search for the α − predicate value as the size of the intersection of antecedents each rule that is formed.
JURNAL VARIAN | e-ISSN: 2581-2017 Because the output in [R16] is severe pre-eclampsia type I, using equation ( 19) we obtain: Because the output in [R24] is severe pre-eclampsia type II, using equation ( 20) we obtain: Because there are 2 rules that are formed, the OR operator in (5) will be applied as a measure of combining the 2 rules.
The geometric representation of the above process is presented in Figure 6 Figure  Furthermore, based on Figure 7, equation ( 6) can be written as where M i = moment from region i, A i = area i, i = 1, 2, 3, 4.
By calculating the moment and area of each region and then substituting into equation ( 23), the final result is z * = 6.39.Consequently, it can be said that the pre-eclampsia status of the patient with the initials K. T. is severe pre-eclampsia type I.By applying the same calculation method as in examples 1, 2, and 3 for patient data for the other 19 patients data from Atambua Hospital and Kefamenanu Hospital, a MAPE value of 7.27% and a prediction accuracy of 92.73% was obtained.Based on the interpretation of the MAPE values presented by (Nabillah and Ranggadara, 2020), it can be concluded that FIS Mamdani has a very good ability to determine pre-eclampsia status.

The Development of a Pre-Eclampsia Diagnostic System Using the Fuzzy Toolbox in Matlab
After designing the mathematical calculations for FIS Mamdani, the next step is to establish a pre-eclampsia diagnostic system using the toolbox in Matlab.Starting with making membership functions for each variable based on equations ( 8) to ( 19).The designing process is presented in Figure 8     The blue box is a section for blood pressure and proteinuria values input.The final result as a diagnosis of pre-eclampsia is shown in the form of a score (red box) whose interpretation can be seen in the explanation of the membership function of pre-eclampsia status that has been presented previously while the red arrows indicate the combined set of fuzzy regions which become the centroid of the combination of rules formed for this patient data.Validation After designing the diagnostic system, validation was carried out to compare the suitability between the diagnosis results based on expert decisions and FIS.The system is said to be valid when there are more comparisons that are appropriate than those that are not.The following is a comparison of the results of diagnoses based on experts and systems from data on 20 patients from Atambua regional public hospital and Kefamenanu regional public hospital.The comparison is presented in Table 3 below.
Membership Function Definition 3. (Mada et al., 2022) A membership function µ is said to be triangular (on (a, b)) if it can be written as equation (3),

Figure 3 .
Figure 3. Membership Function Graph of Blood Pressure

Figure 5 .
Figure 5. Membership Function Graph of Pre-eclampsia Status

Figure 8 .
Figure 8.(a) Determination of Input and Output Variables; (b) Domain Settings of Each Fuzzy Set

Figure 9 .
Figure 9. Graph of Blood Pressure Membership Function with Matlab

Figure 13 .
Figure 13.Results of Defuzzification of Pre-eclampsia Status

Table 1 .
Conditions and Categories of Proteinuria Examination

Table 3 .
Comparison Between Calculations Obtained Through FIS Methods and The Actual Data