A Hybrid Fuzzy and K-Nearest Neighbor Approach for Debris Flow Disaster Prevention

Taiwan is located in a high-risk area for natural disasters. In recent years, violent natural disasters have occurred in Taiwan. Numerous disasters—such as flooding, surges of river water level, and earth and rock disasters—are caused by instant heavy rainfall. These disasters cause considerable loss of lives and property. Current disaster warning systems can only provide warnings to large areas and not to specific small areas. Therefore, the current study developed a disaster warning system based on machine learning for evaluating the likelihood of earth and rock disasters so that an early warning can be provided to people who may be affected by these disasters. In contrast to previous relevant studies, which have mostly used regional assessment methods, no large-scale regional simulation was conducted in the present study. Instead, a comprehensive debris flow evaluation model based on information related to soil flow, rock flow, typhoons, and rainfall history was established to provide warnings regarding debris flow disasters. The geological condition, rainfall, soil moisture and river water level in 1-h intervals were evaluated using the K-nearest neighbor algorithm, providing people earth and rock flow information for the area around their homes. Data related to Typhoon Kameiji, Typhoon Xinleke, Typhoon Morak, Typhoon Sura, Typhoon Megi, and the 0823 Tropical depression were used as training data for the developed model, and data related to Typhoon Megi and Typhoon Kangrui were used as testing data. The proposed model can provide earlier warnings than can the Taiwanese government’s soil and stone flow warning system. The developed model was used to create a mobile phone application that presents comprehensive and easy-to-understand data on the debris flow warning level, hourly rainfall, total rainfall, and geological conditions in real time.


I. INTRODUCTION
The Taiwanese government has legislated a land planning law based on development zones and conservation methods to ensure the safety of the lives and properties of residents living on hillsides in Taiwan. The Soil and Water Conservation Bureau, Council of Agriculture, Executive Yuan, conducted a survey of potential streams across Taiwan. According to statistics, 1,726 [1] streams existed in Taiwan at the end of 2019. Thus, debris flow disasters have major impacts in Taiwan. In recent years, with the improvement of computing capability and the advance in data analysis and simulation technologies, many early disaster warning models have been developed by industry, the government, and academics.
The associate editor coordinating the review of this manuscript and approving it for publication was Juntao Fei .
Many scholars have proposed simulations of debris flow disasters over a single stream or small area rather than over a large area. In reference [2], a research analysis of debris flow for the river basin in Hualien area located in eastern Taiwan was performed from 1983 to 1993. Data that mainly affects the occurrence of soil-rock flow such as effective accumulated rainfall, rainfall intensity, stream length, average stream slope, etc., were collected and the neural network prediction models were used to investigate the possibility of early warning of debris flow. However, the accuracy rate of this research is only 75% due to uneven distribution of the data. The variance of data for estimation in this model is too large such that the validity in forecasting the occurrence of debris flow is not high enough. In reference [3], 15 factors like ring ratio, length ratio, length of mainstream, catchment area, 29 curvature of mainstream, relative height of mainstream, and average gradient of mainstream were measured for analysis and as training data in the algorithm of the back propagation neural to forecast the dangerous zone of debris flow. The accuracy rate for the occurrence of debris flow is approximate 88%. However, there were still unreliable results after the training phase was completed in the back propagation neural network due to lack of taking into consideration some other important factors. Hence this research only verified the importance of the considering factors in the training model. The effectiveness of the model in [3] is unclear.
The Soil and Water Conservation Bureau delineates a single potential stream for evaluation and calculates the scope of influence. However, this approach has low accuracy. A comprehensive evaluation scheme based on the collection of relevant data hence is necessary for effectively improving the accuracy of early warning for debris flows. This paper developed a machine-learning model to achieve this purpose. Geographical conditions are important factors in predicting debris flow. Hillside slope, conglomerate depth and soil liquefaction index play a role for evaluating geographic conditions. However, the data of these factors do not change rapidly over time. Fuzzy theory has features of fuzziness, subjectivity uncertainty and without complicated mathematics mode. Therefore, hillside slope, conglomerate depth and soil liquefaction index are employed by fuzzy algorithm to produce geographical condition. This procedure avoids the KNN shortcomings: small data sample and less sample variability which cause misclassification. Moreover, the K-nearest neighbor (KNN) algorithm was used to assess the rainfall, soil moisture, and river water level under major debris flow disasters caused by typhoons. The comprehensive information provided by the developed system can help the public take appropriate measures to protect themselves and their property against earth flow disasters.

A. CHARACTERISTICS OF DEBRIS FLOW
Debris flow is a natural phenomenon that occurs when water flows along slopes and carries slope particles with it. A debris flow disaster occurs when debris flow causes casualties; injuries; and damage to buildings, bridges, and public constructions [4]. Debris flow contains water and slope particles, such as soil, sand, gravel, or boulders, and flows down slopes because of gravity [5]. When the runoff caused by rainfall or groundwater increases, loose material on slopes, such as avalanche sand or weathered gravel, loses its stability and mixes well with the water. The mixture of water and material then flows down the slope due to gravity [6]. Debris flow can usually be divided into three parts: the occurrence section, transportation section, and accumulation area, as shown in Figure 1. The gradients of these three parts are approximately 15 • -30 • , 6 • -15 • , and 3 • -6 • , respectively.
Debris flow can contain different ratios of water, mud, sand, and gravel, which result in different types of debris flow disaster. Flow can be divided into three types: (1) mud-flow-type, (2) gravel-type, and (3) general-type debris flow [7]. Figure 1 presents the material composition of debris flow. Most of mud-flow-type debris flows comprise mud and sand; gravel-type debris flow contains more gravel than mud and sand; and general-type debris flow has an even distribution of water, mud, sand, and gravel. Figure 1 also shows the material composition of the three types of debris flows that frequently occur in Taiwan. The occurrence of earth-rock flow requires to fulfill certain basic conditions and inducing conditions [6], [8]- [11].

B. BASIC CONDITIONS FOR THE OCCURRENCE OF DEBRIS FLOW
Debris flow occurs when the following conditions are met: (1) abundance of loose sand, (2) abundance of water, and (3) presence of a steep slope or river bed. Such flow usually moves forward in a straight line; however, it damages obstacles (trees and houses) when it encounters them. In addition, heavy soil, rock, and conglomerate are present in the front section of the soil-rock flow and result in the flow having a violent impact on obstacles. Debris flow can wash away or bury bridges, piers, and various artificial structures located on slopes or under mountains. It can also cause large-scale erosion of the river bed and disappearance of the foundations of buildings constructed along rivers. Because of the steep slopes and short currents in Taiwan, debris flows quickly along slopes (with a speed of 5-10 m/s). Debris flows in Taiwan usually last for approximately 15 min. The required basic conditions for the occurrence of earth-rock flow are given as follows [9]- [14]:

1) LOOSE SOIL AND SAND
Soil sand is a crucial component of soil-rock flow. The occurrence of soil sand mostly depends on the geological conditions of the watershed or slope, such as overexploitation of the watershed or mountain slope, frequent earthquakes, and rock fragmentation [14]. A rich source of soil and sand is required for the occurrence of debris flow. Human activities may result in the generation of sufficient soil and sand for generation of debris flow. Most of the debris flows that occur in valleys are large-scale upstream collapse-entrained debris flows. Debris flow produces soil and rock that erode river banks and stream beds in valleys [10], [13].

2) ABUNDANT RAINFALL
Rainfall is a crucial factor affecting the composition of earthrock flow, and abundant rainfall triggers debris flow. After soil sand and water are mixed, the mixture flows down the slope under the influence of gravity [8]. The presence of abundant rainfall reduces the friction acting on moving bodies such that debris flows are built [10], [11].

3) GEOGRAPHICAL CONDITIONS
Geographical conditions influence the formation of debris flows. These flows exert strong erosive forces when they move over steep slopes. An increase in the velocity of debris flow results in an increase in its erosive force, which causes the production of additional soil and sand on slopes, in turn enhancing the scale of the debris flow [11].

C. CONDITIONS INDUCING DEBRIS FLOW
Five factors induce debris flows and these conditions are described as follows: Terrain changes: An earthquake or human-caused damage results in terrain changes, which can cause rapid changes in landforms. Unstable landforms cause slope changes and the production of loose soil and rock, which result in insufficient natural protection against debris flow [14].
Rapid increases in rainfall: Ikedani Hiroshi proposed three types of heavy rainfall conditions: (1) 30-40 mm/h for 8 h, (2) 40-60 mm/h for 4 h, and (3) 80 mm/h for 3 h. Rapid increases in rainfall result in soil saturation, which may cause the entrainment of soil, sand, and gravel in the flowing water and thus lead to debris flow formation.
Severe soil liquefaction: The combination of a high quantity of sand in soil, a high groundwater level, and a strong earthquake can result in severe soil liquefaction, which causes the floating of sandy particles in water and thus a reduction in the cohesiveness of sandy soil. Severe soil liquefaction can result in debris flow.
Excessive soil moisture content: Excessive rainfall results in excessive soil moisture content, which can reduce the ability of trees to protect the ground against soil erosion. The occurrence of soil erosion increases the probability of debris flow.
Considerable increase in the river water level: When soil is saturated, it cannot absorb water; thus, the water flows into a river, which causes a considerable increase in the upstream water level. Moreover, downstream flooding with the erosion of soil and rock results in damage of the downstream river bed.

II. MATERIALS AND METHODS
A. K-NEAREST NEIGHBOR ALGORITHM K Nearest Neighbor algorithm falls under the Supervised Learning category and is used for classification (most commonly) and regression. It is a versatile algorithm also used for imputing missing values and resampling datasets. As the name (K Nearest Neighbor) suggests it considers K Nearest Neighbors (Data points) to predict the class or continuous value for the new Datapoint.
In KNN, a query is labelled by a majority vote of its knearest neighbors in the training set.
denote the training set, where x i ∈ R m is the training vector in the m-dimensional feature space, and y i is the corresponding class label. Let x be a query vector. Then its corresponding class y can be obtained by following two steps [15]: Firstly, a set of k similar labelled target neighbors for the query x is identified. Denote the set are arranged in an increasing order in terms of the Euclidean distance d x ; x NN i between x and x NN i , as follows: Secondly, the class label of the query is predicted by the majority voting of its nearest neighbors: where y is a class label and y NN i is the class label for the ith nearest neighbor among its k nearest neighbors. The Dirac function δ y = y NN i takes a value of one if y = y NN i and zero otherwise.

B. FUZZY ALGORITHM
Given a universe U of objects, a conventional crisp subset A of U is commonly defined by specifying the objects of the universe that are members of A. An equivalent way of defining A is to specify the characteristic function of A, U A , Fuzzy sets are derived by generalizing the concept of a characteristic function to a membership function Most crisp set operations (such as union and intersection) and set properties have analogs in fuzzy set theory. For a more detailed presentation is given in [16].
How to do Fuzzy logic is an interesting question. The answer to it is a three-step process: (1) Classification; (2) Fuzzy decision blocks, and (3) Defuzzification.
The knowledge base consist of a rule base defined in terms of fuzzy rules, and a data base that contains the definitions of the linguistic terms for each input and output linguistic variable. The fuzzification interface transforms the (crisp) input values into fuzzy values, by computing their membership to all linguistic terms defined in the corresponding input domain. The inference engine performs the fuzzy inference process, by computing the activation degree and the output of each rule. The defuzzification interface computes the (crisp) output values by combining the output of the rules and performing a specific transformation.

C. PROPOSED METHOD
The procedure for comprehensive assessment of the debris flow alert level is shown in Figure 2. The assessment is involved the following five steps: 2). Retain the required information; delete redundant data; and note the hourly debris flow alert level, time of debris flow occurrence, and rainfall change.
3). Use a fuzzy algorithm to evaluate geological conditions, such as hillside slope, soil liquefaction index, and conglomerate depth. 4). Input the geological conditions, hourly rainfall, 24-h accumulated rainfall, river water volume, and soil moisture into a KNN algorithm to evaluate the debris flow alert level. 5). Finally, present the debris flow warning level, hourly rainfall, accumulated rainfall, and geological conditions on a mobile app.

D. DATA PREPROCESSING
Time-series data are collected in databases. However, these databases contained considerable meaningless and erroneous data from each measurement station due to aging and lack of calibration and correction of apparatus, environment noise, and interference. Such data increase the inaccuracy of the developed model and need to be deleted.
Only the data values reaching or over the red and yellow warning thresholds defined by the Water and Soil Conservation Bureau were downloaded from the database as shown in Figure 3. The proposed model has four alert levels, with level 4 being the highest alert level. The debris flow  alert levels are defined revised in accordance with the time of debris flow occurrence as shown in Table 1. Debris flow alert levels from 1 to 4 correspond to periods of 1-3, 3-5, 5-6, and over 6 h, respectively, before the occurrence of debris flow.

E. DESIGN OF THE PROPOSED FUZZY SYSTEM
The existence of loose soil and rock is a basic condition for the occurrence of debris flow. No absolute causality exists between the various influencing geological conditions. A set of fuzzy rules can be developed by considering the aforementioned fact and descriptions of previous disasters. Fuzzy rules are designed by establishing input language variables, output language variables, and related terms and defining their attribution functions. This study used fuzzy rules, fuzzy inferences, and defuzzification to design a fuzzy system for the comprehensive assessment of geological conditions.

F. ASSOCIATING EACH TERM WITH ITS ATTRIBUTION FUNCTION
The model developed in this study uses three input parameters, namely conglomerate depth, hill slope, and soil liquefaction index, and provides one output result. Conglomerate depth and soil liquefaction index are divided into low, medium, and high categories; hill slope is divided into the low, medium, slightly high, and high categories; and the output is ''Normal,'' ''Warning,'' ''Alert,'' or ''Severe.'' After establishing the relevant terminology, the attribution function of each term must be defined. The attribution function graphs of this study are based on that in [17] and indicate that superior results can be obtained using the Trimf and trapezoid (Trapmf) attribution functions. Figure 4 demonstrates various attribution functions proposed in this study. The design of the membership function (MF) is a curve that defines how each point in the input space is mapped to a membership value (or degree of membership) between 0 and 1. The input space is sometimes referred to as the universe of discourse, a fancy name for a simple concept.
2. A fuzzy set admits the possibility of partial membership in it. (For example, Low potential, Medium potential, High potential).
3. The degree an object belongs to a fuzzy set is denoted by a membership value between 0 and 1 (For example, 17.5 meter is a medium of Conglomerate depth to the degree 1). 4. A membership function associated with a given fuzzy set maps an input value to its appropriate membership value.

G. PLANNING LIBRARY OF FUZZY RULES
A fuzzy rule library was planned by considering the influence of certain parameters on debris flow disasters and the relevant data of the Soil and Water Conservation Bureau. Rules for evaluation of the geological conditions are shown in Table 2, where each of the input parameters Conglomerate depth and Liquefaction Index has three different fuzzy levels, and the input parameter Slope has four fuzzy levels. Hence there are total of 36 rules in the library for the geological condition. A comparison of various fuzzy rules is shown in Table 3.

H. THE KNN BASED PREDICTION MODEL
In this study the proposed fuzzy system is used for comprehensively evaluating geological conditions, namely conglomerate depth, soil liquefaction index, and slope gradient. Then the aforementioned parameters: hourly rainfall, total rainfall, soil moisture level, and river water level then are input into the KNN algorithm for forecasting the occurrence of debris flows. In the prediction model, data were divided into a training set and testing set in accordance with the research needs, and the KNN algorithm is used to perform the prediction as shown in Figure 5. The distance between each training sample was calculated based on the proposed model. The set of calculated distances were sorted and the K training samples with the closest distance were selected. Each sample was classified and assigned into one of the four preset categories. Then the testing data were used to verify the accuracy of the developed prediction model by assessing the debris flow warning value. With the proposed scheme, the geological conditions, rainfall, and debris flow warning levels can be quickly obtained around these observation spots.

I. REMOTE DISPLAY THROUGH MOBILE APP
After assessing the basic and inducing conditions of debris flow to obtain the corresponding warning levels, a mobile phone app is developed by using Android Studio for remote display of the obtained results. As an example shown in Figure 6, the left column displays the parameters: the hourly rainfall, accumulated rainfall, river water level, and geological conditions, and the right column shows warning levels for the debris flow.

III. RESULTS AND DISCUSSIONS
This research used data related to seven typhoons and one tropical depression that caused severe debris flow disasters. Information related to Typhoon Kameiji, Typhoon Sinlaku, Typhoon Morakot, Typhoon Sura, Typhoon Megi, and the 0823 Tropical depression was used as training data, whereas information related to Typhoon Megi and Typhoon Kangrui was used as testing data. The testing and training data were obtained from the Soil and Rock Flow Prevention Information Network of the Council of Agriculture of the Executive Yuan, Taiwan. For convenience, only the data of Typhoon Morakot, Typhoon Kameiji, and Typhoon Megi are presented in this paper.

A. COMPREHENSIVE ASSESSMENT OF THE DEBRIS FLOW ALERT LEVEL
The main purpose of this study was to establish a debris flow warning model based on the data of typhoons that have caused debris flow disasters in Taiwan. This section presents the data for Typhoons Morakot, Kameiji, and Megi.

1) COMPREHENSIVE DEBRIS FLOW ALERT ANALYSIS FOR TYPHOON MORAKOT
Typhoon Morakot brought abundant rainfall to and caused many debris flow disasters in Taiwan. The most severe effects of this typhoon were observed in Xiaolin Village in Kaohsiung County. The amount of rainfall brought by Typhoon Morakot to Xiaolin Village is presented in Figure 7.  Table 4 lists the geological conditions, hourly rainfall, 24-h rainfall, soil moisture, river water level, and alert level evaluations for Typhoon Morakot. The aforementioned table indicates that Typhoon Morakot caused a high quantity of rainfall. The rainfall was not intense but continued for a long time. The timing of the debris flow in Xiaolin Village was approximately 05:00 on August 9, 2009. The observation results indicate that the de-bris flow disaster occurred in a gradual manner, whereas other disasters occurred quickly. The rainfall increased suddenly on August 8, 2009, between 15:00 and 17:00, and the soil could not absorb the river water. The alert level was increased from 1 to 2 and then 3. At 18:00 on the aforementioned day, the soil moisture reached saturation and the water level of the river increased. At this time, the alert level was increased to 4. Figure 8 illustrates an analysis of the alert levels for Typhoon Morakot. The rainfall on August 8, 2009, increased rapidly at 10:00 to a value corresponding to a level 2 alert; however, a level 2 alert was only raised at 12:00 on this day. The rainfall did not slow until 17:00 on the aforementioned day, which resulted in the soil moisture and river water level increasing to values corresponding to a level 4 alert; however, a level 4 alert was only raised at 18:00.

2) COMPREHENSIVE DEBRIS FLOW ALERT ANALYSIS FOR TYPHOON KAMEIJI
As displayed in Figure 9, Typhoon Kameiji was a typical short-term, heavy-rainfall typhoon. From 13:00 on July 17, 2008, the rainfall increased to 50 mm and remained at this level for 8-9 h. Liugui Township, where Dajin rainfall station is located, lies along the Laonong River. This township has a relatively unstable alluvial fan terrain that is formed by the accumulation of soil and rock entrained by river water and rainwater. The terrain is relatively steep, and its surface is easily affected by external forces. A short period of heavy rainfall causes landslides to occur along the steep terrain. Table 5 presents the geological conditions, hourly rainfall, 24-h rainfall, soil moisture level, river water level, and alert level evaluation for Typhoon Kameiji. The rainfall caused by Typhoon Kameiji increased rapidly, and the geological conditions were classified as severe after a fuzzy system assessment. Unlike in the case of Typhoon Morakot, the debris flow alert increased from 1 to 2 on July 17, 2008, at 18:00 for Typhoon Kameiji because of excessive rainfall. On July 17, 2008, at 21:00, the rainfall did not decrease, the soil became saturated, and the river water level increased rapidly. The alert level was increased to 4 on July 18, 2008, at 01:00-04:00. After 04:00, the rainfall decreased significantly and the river water level stabilized; there-fore, the alert level was decreased to level 3. After 05:00-06:00 on July 18, 2008, the rainfall and river water level increased; therefore, the alert level was increased to 4.

3) DEBRIS FLOW ALERT LEVEL ANALYSIS FOR TYPHOON MEIJI
Although Typhoon Meiji did not directly hit Taiwan, the influence of its outer circulation caused severe damage in northern Taiwan. As displayed in Figure 10, the rainfall during Typhoon Meiji increased slowly in the early period and then rose rapidly in the mid-term. Suao is located in the Lanyang Plain near the estuary of the Xincheng River. Because Suao is also in the early stage of coastal development, Typhoon Meiji caused con-siderable environmental damage at this location. Suao has high conglomerate depth, high soil liquefaction index, gentle slopes, and low surface stability. The rainfall caused by the aforementioned typhoon gradually increased, and the soil became unstable and was easily washed downstream by the rainfall. The Xicheng River is located in the downstream section. Large quantities of soil and rock were entrained by the river water, which moved quickly. Consequently, the runoff became destructive. Table 6 presents the geological conditions, hourly rainfall, 24-h rainfall, soil moisture, river water level, and alert level evaluations for Typhoon Meiji. On October 21, 2012, the alert level was 3 or 4 at 10:00-11:00 because of the intense rainfall. When the rainfall intensity decreased between 19:00 and 21:00 on the aforementioned day, the alert level was decreased to 2.

4) DEBRIS FLOW ALERT LEVEL ANALYSIS FOR TYPHOON LICHMA
As displayed in Figure 11, although Typhoon Lichma did not make landfall in Taiwan, its outer circulation had a considerable impact in Taiwan. The residents of the northern mountainous areas of Taiwan were evacuated in advance to protect them from its impact. Moreover, because of Typhoon Lichma, the Taiwanese stock exchange was closed and the operation of the Taiwanese high-speed railway was halted for 1 day. This section mainly describes the impact of the peripheral circulation of Typhoon Lichma and the associated debris flow disasters. Caoling Village is located in Yunlin County in the Central Mountain Range. This village has a moderate slope of 20 • -30 • , a moderate conglomerate depth, and a low soil liquefaction index. The geological conditions in the aforementioned village correspond to the warning level.
Coaling village is subjected to large-scale human-caused damage, and the slope of its conglomerate accumulation area is steep. The soil and rock in the aforementioned area slide fast, and the slope can collapse easily under strong heavy rain. Table 7 presents the geological conditions, hourly rainfall, 24-h rainfall, soil moisture, river water level, and alert level evacuations for Typhoon Lichma. The rainfall caused by this typhoon increased slowly at 12:00 on August 10, 2019; however, the 4-h cumulative rainfall exceeded 60 mm. The debris flow alert level was in-creased to 2 between 23:00 on August 10 and 03:00 on August 11, 2019. The rainfall increased slowly after 03:00 on August 11, and the alert level was increased to 3 between 04:00 and 08:00 on this date.

5) DIFFERENCES BETWEEN THE DEBRIS FLOW WARNING LEVELS GIVEN BY THE TAIWANESE GOVERNMENT AND THOSE OBTAINED IN THIS STUDY
The layout should be neat, and related terms should not be repeated. In this paper, the debris flow warning levels obtained in this study are indicated by (A) and the government's debris flow warning levels are indicated by (B). Four levels of debris flow alert were considered in this study, and these alerts are different from the corresponding alerts of the government. Alert levels 1 and 2 in this study are the same as alert level 1 of the government; alert level 3 in this study is the same as alert level 2 of the government; and alert level 4 in this study is the same as alert level 3 of the government. Three problems exist with the (B) alert levels. First, the ranges of the alerts are too flexible, and the ranges of their reference values are too narrow. Second, if a red alert is issued and people are asked to evacuate but no disaster occurs, they begin to lose their trust in the alerts. Third, in many cases, a red alert is issued too late and only after the disaster has occurred. The aim of this research was to establish a comprehensive debris flow alert model based on geological conditions and historical hourly rainfall, 24-h rainfall, soil moisture, and river water level data to develop more rigid ranges of alert reference values. The developed model provides relevant warnings earlier than the government's method does; thus, people can respond earlier to potential disasters when using the developed model. Figures 12-14 illustrate the differences in the alerts issued by the government and developed model. Figure 12 illustrates the differences in alerts of the government and developed model for Typhoon Morakot. The developed model returned an alert level of 2 when the rainfall increased rapidly at 10:00 on August 8, 2009, whereas the government issued this alert level only at 12:00 on the same day. Moreover, the (A) alert level was 4 at 17:00 on the aforementioned day because the rainfall did not slow and the river water level continuously increased. By comparison,      however, the (B) alert level became 4 only at 12:00 on the aforementioned day.
The aforementioned results indicate that the proposed model can provide faster warnings than can the Taiwanese government's current early warning system for debris flow disasters. The developed model considers the basic and  inducing conditions for debris flow to delineate the data sampling range and the warning conditions for landslides with relatively high accuracy. The aforementioned model considers rainfall increases to provide early warnings of debris flow disasters so that people have more time to escape.

B. COMPREHENSIVE ASSESSSMENT OF DISASTER PREVENTION GUIDELINES
After conducting a comprehensive evaluation by using the designed fuzzy system and KNN algorithm, four levels of debris flow alert (Table 8) were distinguished in accordance with the Disaster Prevention Guidelines of the Soil and Water Conservation Bureau to help people respond early to potential disasters.

IV. CONCLUSION
This study developed a debris flow disaster prediction model that uses a fuzzy system to evaluate three geological conditions-namely conglomerate depth, soil liquefaction index, and slope gradient-and employs the KNN algorithm for classifying and comprehensively evaluating rainfall, 24-h rainfall, soil moisture, and river water level. The pro-posed model is implemented on a mobile phone app that displays the alert level for debris flow, real-time rainfall, total rainfall, and geological conditions so that people can respond to disasters early as per the disaster prevention guidelines of this study for reducing the loss of life and property.
According to the experimental results of this study, the developed model provides warnings earlier and adopts data more rigorously and objectively than does the Taiwan-ese government's current early warning system for debris flow disasters. Thus, the developed model enables people to respond early to debris flow disasters.
The contributions of this research are as follows: 1. The developed model provides earlier warnings than does the Taiwanese government's current early warning system for debris flow disasters. The developed model can quickly alert people regarding disasters so that they have sufficient time to respond appropriately. The correct and immediate warnings provided by the developed model can save people's lives and protect their property.
2. The developed model performs more comprehensive and rigorous assessments than does the aforementioned system of the Taiwanese government. Moreover, the afore-mentioned model has a wider range of warning levels than does the government's system so that people can react appropriately according to the scale of the debris flow disaster.
3. The comprehensive evaluation indices employed in this study for geological conditions provide the public an additional reference in housing purchase and investment. These indices can also be used in disaster prevention as well as soil and water conservation and maintenance.
Artificial Neural Network algorithm may be a option for our research work. In future, we will employ KNN-ANN algorithm to investigate debris flow disaster issues in Taiwan.