Implementation of Fuzzy Mamdani Method to Classify Public Health Level in North Sumatra Province

- Health is one of the most important fields aspects in people’s lives. Public health is influenced by several factors, such as environmental factors and lifestyle. Every year, the government makes a program to improve people’s health and welfare. Therefore, the government needs to obtain information about the classification of public health levels to monitor the progress of the programs that have been carried out. The research created an interface application to classify the level of public health in North Sumatra Province. The research classified the public health level using data from Badan Pusat Statistik (BPS) in 2018. Next, the application was made using the Matlab 2013b GUI. Classification of the level of public health was carried out using the Fuzzy Mamdani method that generated public health classification levels based on the inputted indicators. Then, the level of health classification was divided into four parts: low, lower middle, upper middle, and high. The result shows that for the 2018 data, some cities/ districts are still at low health levels. However, many cities or districts have good health levels. The final result can be used as a reference for the government to analyze which cities/districts should be paid attention to improve their health and welfare.


I. INTRODUCTION
Health is a vital part of these days as it affects many aspects of human life, such as the economy, education, and infrastructure. A healthy society supports a stronger country. Therefore, the central government promotes several programs in the health sector. One of the government programs that has been running is the Program Indonesia Sehat (Healthy Indonesia Program). This program is implemented by enforcing three main pillars, consisting of (1) application of a healthy paradigm, (2) strengthening of health services, and (3) implementation of national health insurance. In addition, the government, through public health institutions such as Dinas Kesehatan (Health Office) and Puskesmas (Community Health Center), also routinely provides health education to the public about environmental health and personal health.
Society and government pay attention to the factors that affect public health which is influenced by four factors: environment, behavior, health services, and heredity. The most important factor among these four factors is the environmental factor. In addition, many studies have discussed the relationship between environmental conditions and health. For example, Wijirahayu and Sukesi (2019) said that physical environmental conditions affected the incidence of dengue hemorrhagic fever. Then, Rahanyamtel, Nurjazuli, and Sulistiyani (2019) stated that environmental factors influenced filariasis incidence in Semarang Regency. Zulaikhah, Ratnawati, Sulastri, Nurkhikmah, and Lestari (2019) found a relationship between knowledge, behavior, and home environment with pulmonary tuberculosis transmission incidence in the work area of Bandarharjo Health Center. However, previous studies have not found an interface application that can measure the level of public health from environmental factors.
Every province in Indonesia has some program to maintain and increase public health levels. North Sumatra is one of the provinces with public health programs, such as immunization and counseling. Recently, the health office in North Sumatra Province publishes a new program that collaborates with United States Agency for International Development (USAID) called MOMENTUM program (Dinas Kesehatan Provinsi Sumatera Utara, 2021). However, it needs an interface application that can show the health level of all cities/districts in North Sumatra Province to measure the program. Besides that, the research also wants to know which cities/districts still have low and good health levels. As the input variables, the research uses uncertain sets (low, middle, and high), and the interface application must accommodate data in uncertain sets. One method that can be used to handle uncertain sets is fuzzy logic. For example, Chusyairi, Saputra, and Zaenudin (2021) used fuzzy logic for grouping healthcare centers on diarrhea disease in Banyuwangi District. Their study used uncertain datasets of infant diarrheal disease sufferers from 2016 to 2019. As the previous research has good results in using the fuzzy Mamdani logic method, the research also uses this method. Thus, the research builds a Fuzzy Inference System (FIS) in MATLAB according to the Mamdani method. Mamdani method produces an output in the form of a value in the domain of the fuzzy set, which is categorized into linguistic components (Sari et al., 2021;Ahmad Shukri & Isa, 2021).
Next, concluding using fuzzy logic can be done by some methods, such as Sugeno and Mamdani methods (Permana & Lelah, 2020;Abd Halim & Lazim, 2021). The difference between these two methods lies in the output produced, the process of rule composition, and defuzzification. In the Sugeno method, the resulting output is a linear function or a constant. In contrast, the Mamdani method produces an output in the form of a value in the domain of the fuzzy set, which is categorized into linguistic components (Batubara, 2017;Egaji, Griffiths, Hasan, & Yu, 2015;Putri & Saputro, 2021). The Mamdani method is also one of the best parts of the fuzzy system for drawing conclusions from the uncertain variable. Therefore, in the research, the classification of public health is carried out using the fuzzy Mamdani method.

II. METHODS
The research classifies the public health level of North Sumatra Province using data from Badan Pusat Statistik (BPS) in 2018 (Badan Pusat Statistik Provinsi Sumatera Utara, 2018). Next, the research builds an interface application based on fuzzy logic. The first step is determining that the fuzzy system consists of fuzzy variables, fuzzy sets, universe of speech, and fuzzy set domains. Fuzzy variables used in the research are based on the factors that affect environmental health and data availability from BPS. There are four input variables related to environmental factors to classify the level of public health. The variables are the percentage of community in cities/districts with access to proper drinking water (x 1 ), the percentage of households with access to proper sanitation (x 2 ), the percentage of households using defecation facilities (alone/not shared, shared, and public facility) (x 3 ), and Pure Participation Rate (PPR) for senior high school level (x 4 ). These four input variables are classified into three fuzzy sets that are low, middle, and high. However, all the variable input is in percentage (0%-100%). Besides that, the research determines one output variable consisting of four fuzzy sets: low, lower middle, upper middle, and high.
After determining the fuzzy system, the research puts the membership function of each input and output variable. The membership function is determined based on the fuzzy sets. The value of the membership function of a fuzzy set is between 0 and 1. There are some membership functions. Some of them are linear curve, triangular curve, trapezium curve, and Gaussian curve (Pamuji, 2016). The next step is to build FIS in MATLAB. In this step, input variables are mapped into output variables using IF-THEN rules. The research builds FIS in MATLAB according to the Mamdani method because it produces an output in the form of a value in the domain of the fuzzy set, which is categorized into linguistic components. After creating the FIS in MATLAB, an interface application using the MATLAB GUI is also built. The MATLAB GUI displays the result of classification that is low, lower middle, upper middle, and high levels. The mathematical calculation is done to see whether the program runs well. The research determines the α-predicate of the rule with the MIN implication function. The last step is defuzzification. The crisp solution is obtained by taking the center point (z*) of the fuzzy area. The center point (z*) is formulated as follows (Mugirahayu, Linawati, & Setiawan, 2021). (1)

Calculation of the center point (z*) in Equation
(1) is done manually. All calculations are conducted for each city/district. Then, the results of MATLAB calculations and manual calculations are compared. From the comparison of this calculation, some conclusions can be drawn.

III. RESULTS AND DISCUSSIONS
The people of North Sumatra Province in several cities/regencies still have difficulty accessing proper drinking water (x 1 ). Based on BPS data in 2018, the average number of people in North Sumatra Province who can access proper drinking water is 57%. Figure  1 shows that the people in Nias Regency have the lowest percentage of accessing proper drinking water. Meanwhile, the cities/districts where most people have access to proper drinking water are Pematangsiantar City, Sibolga Regency, and Medan City.
Based on BPS data in 2018, the average community sanitation level (x 2 ) in North Sumatra Province is 61,7%. The people of North Sumatra Province in several cities/regencies already have good sanitation. Figure 2 shows that the people of South Nias Regency and Nias Regency have the lowest level of sanitation. Meanwhile, Pematangsiantar City, Medan City, Binjai Regency, Asahan Regency, and Deli Serdang Regency already have good sanitation.
The people of North Sumatra Province in several cities/regencies already have defecation facilities (x 3 ). Based on BPS data in 2018, the average percentage of households using defecation facilities in North Sumatra Province is 85%. Figure 3 shows that the people of Nias Regency and Mandailing Natal Regency have the lowest level of defecation facilities. However, the percentage of most of cities/regencies in North Sumatra using defecation facilities is above 85%.
The PPR (x 4 ) of the people of North Sumatra Province in several cities/regencies is already good. Based on BPS data in 2018, the average PPR of North Sumatra Province is 70,83%. Figure 4 shows that the people of Asahan Regency and Batu Bara Regency have the lowest PPR. Meanwhile, Lumbang Hasundutan Regency, Samosir Regency, and Toba Samosir Regency have PPR above 80%.
The next step is to determine the fuzzy domain after knowing the condition of x 1 , x 2 , x 3 , and x 4 . These four input variables are divided into three ranges: low, middle, and high. Then, the output variables are divided into four ranges: low, lower middle, upper middle, and high. Fuzzy domains for input and output variables are presented in Table 1. After creating a fuzzy domain, the next step is to form a membership function for each input and output variables. The first input variable is the percentage of districts/cities with access to proper drinking water (x 1 ). This variable is the first variable in the input variable. The x 1 is divided into three fuzzy sets that are low, middle, and high. The membership function for x 1 forms three triangular curves. The representation of the membership function of x 1 can be seen in Figure 5.  The second variable is the percentage of households with access to proper sanitation (x 2 ). This variable is divided into three fuzzy sets: low, middle, and high. The membership function for the (x 2 ) forms two kinds of curves: a linear curve for low and high sets and a trapezoidal curve for the middle set. The representation of the membership function of (x 2 ) can be seen in Figure 6. Figure 6 shows that low and high ranges shape three membership functions. These membership functions are from a linear equation between two points. The middle range forms a trapezoidal curve and five membership functions. The x 2 is in the range of [7-100], so the membership functions start with a value of 7 and ends with a value of 100. The membership functions of x 2 are formulated as follows. (5) The third variable is the percentage of households using defecation facilities in North Sumatra Province (alone/not shared, shared, and public toilet facilities) (x 3 ). This variable is divided into three fuzzy sets: low, middle, and high. The membership function for the x 3 forms two kinds of curves: linear curves for low and high sets and a triangular curve for the middle set. The representation of the membership function of x 3 can be seen in Figure 7. Figure 7 illustrates that low and high ranges form three membership functions. These membership functions are obtained from a linear equation between two points. The middle range has a triangle curve and four membership functions variable x 3 is in the range of , so the membership functions start with a value of 45 and end with a value of 100. The membership functions of x 3 are formulated as follows.
(8) (9) (10) The fourth variable for input variable is PPR for senior high school level x 4 . This variable is divided into three fuzzy sets: low, middle, and high. The membership function for the x 4 forms two kinds of curves: linear curves for low and high sets and a triangular curve for the middle set. The representation of the membership function of x 4 can be seen in Figure  8.
In The fifth variable is the output variable. This variable is used to classify the public health level. The output variable is divided into four fuzzy sets: low, lower middle, upper middle, and high. The membership functions for the output variables form four triangular curves. The representation of the membership function of the output variable can be seen in Figure 9.
In Figure 9, each low, lower middle, upper middle, and high range forms four membership functions. These membership functions are obtained from a linear equation between two points. The output variable is in the range [0-100], so the membership functions start with a value of 0 and end with a value of 100. The membership functions of output variable are formulated as follows. The research creates fuzzy rules after having the membership function for input and output variables. This rule is created to map input variables into output variables. Each rule takes the form of an IF-THEN implication. The research uses AND operator to connect the four input variables. These fuzzy rules are presented in Table 2 (see Appendix).
Table 2 (see Appendix) shows that there are 81 rules in classification of public health level in North Sumatra Province. The fuzzy rules in Table 2 (see  Appendix) are applied to MATLAB 2013b. It forms a membership function on the MATLAB FIS menu. The display of fuzzy rules in FIS in MATLAB is shown in Figure 10.
The next step is to create ranges for classification levels after creating fuzzy rules in MATLAB FIS. There are four classification levels: low, lower middle, upper middle, and high. Classification level is obtained from the output variable, and the range is created based on Figure 9. Table 3 shows the classification of the health level.
An interface application on the GUI MATLAB is built based on membership functions and fuzzy rules. The application is shown in Figure 11. There are three buttons on the application. The first button is "get data". The "get data" button is used to choose and take data in the form of .xls. The data will be displayed in the application. Furthermore, the "process" button can be clicked if the data have appeared. The "process" button is used to process data in .xls form and generate health level and classification data. The last button is the "close" button. The "close" button is used to close the application system of GUI MATLAB.   Figure 11 shows that the application created will display the name of the city/district with the value of of x 1 , x 2 , x 3 , and x 4 . After the data are processed, the results of the health level and its classification will appear in the next column. The application in Figure  11 is applied to the 2018 North Sumatra Province Data. The classification results are shown in Figure 12.
The classification results shown in Figure  12 determine which cities/districts have low, lower middle, upper middle, and high health levels. The classification results from Figure 12 are shown in Table 4. There are 6 cities/districts in the low level, 5 cities/districts in the lower middle level, 13 cities/ districts in the upper middle, and 9 cities/districts in the high level.
Next, mathematical calculation is used to find and test whether the program runs well. The centroid value for each city/regency community in North Sumatra Province is calculated. Then, it finds out the classification level. The example shows the calculation of the centroid value for Nias District. The number of each variable input of Nias District is x1 =29,15, x 2 =9,65, x 3 =47,53, and x 4 =61,97. So, the membership function for x1 with the value of 29,15 can be calculated based on Equation (2). As x 1 = 29.15, it is

Then, it becomes
The membership function for x 2 with the value of 9,65 can be calculated based on Equation (5). As x 2 = 9,65, it is . Then, it is Then, the membership function for x 3 with the value of 47,53 can be calculated based on Equation (8). As x 3 = 47,53, it is Then, it becomes Next, the membership function for x 4 with the value of 61,97 can be calculated based on Equation (12). As x 4 = 61,97, it is Therefore, it is α 1 = μ A∩B∩C∩D = min (0,332; 0,8847; 0,831; 0,4015) = 0,322. Figure 13 shows the value of α 1 in the shaded section. The centroid value for α 1 -0,322 can be calculated based on Equation (1). The centroid value for Nias District is 15,00. Based on Table 2, this value is classified as low level. This step is also carried out for other cities/districts. The calculation is shown as follows. (18) The comparison of the classification results between application calculations and mathematical calculations is shown in Figure 14. It can be seen that the calculation results in the application system with MATLAB are not much different from the mathematical calculations. From 33 cities/districts, there are only 5 cities/districts with a different value:

IV. CONCLUSIONS
From the research results, the conclusions of this interface application can be used to classify the level of health in North Sumatra Province. This application is quite good because the results displayed are almost close to the actual data. Comparing application and mathematical calculations only gives a 0,0044% error. Based on the used indicators, several cities/ districts still have a low level of health classification: Nias, Mandailing Natal, Nias Selatan, Padang Lawas, Nias Utara, and Nias Barat. However, many cities/ districts already have good health, such as Toba Samosir, Dairi, Karo, Samosir, Sibolga, Tanjungbalai, Pematangsiantar, Medan, and Binjai. The final result can be used as a reference for the government to analyze which cities/districts should be paid attention to improve their health and welfare.
The research uses only four input variables to classify the health level. Hence, several other variables, such as infant mortality rate and community income level, can be analyzed for further research. Application in the research may be used to classify the health level with more input variables. Thus, it can see which variables still need to be improved.