River Flow Estimation Using Artificial Intelligence and Fuzzy Techniques

Accurate determination of river flows and variations is used for the efficient use of water resources, the planning of construction of water structures, and preventing flood disasters. However, accurate flow prediction is related to a good understanding of the hydrological and meteorological characteristics of the river basin. In this study, flow in the river was estimated using Multi Linear Regression (MLR), Artificial Neural Network (ANN), M5 Decision Tree (M5T), Adaptive Neuro-Fuzzy Inference System (ANFIS), Mamdani-Fuzzy Logic (M-FL) and Simple Membership Functions and Fuzzy Rules Generation Technique (SMRGT) models. The Stilwater River in the Sterling region of the USA was selected as the study area and the data obtained from this region were used. Daily rainfall, river flow, and water temperature data were used as input data in all models. In the paper, the performance of the methods is evaluated based on the statistical approach. The results obtained from the generated models were compared with the recorded values. The correlation coefficient (R), Mean Square Error (MSE), and Mean Absolute Error (MAE) statistics are computed separately for each model. According to the comparison criteria, as a final result, it is considered that Mamdani-Fuzzy Logic (M-FL) and Simple Membership Functions and Fuzzy Rules Generation Technique (SMRGT) model have better performance in river flow estimation than the other models.


Introduction
Accurate prediction of the relationship between rainfall-runoff on a drainage basin, prediction of river flows, and changes are used for the efficient use of water resources, planning of the construction of water structures and prevention of flood disasters. With it, the correct flow forecasts, hydrological and meteorological characteristics of the river basin are also related to better understanding. This estimate can be made for a short period of time, such as a single stormy period, or to cover long periods such as monthly or yearly. However, changes in local and regional characteristics make it difficult to determine the relationship between precipitation and flow. In the field of hydrology and water resources, artificial neural networks (ANN), which are one of the black box modeling methods, have been used as a suitable alternative for modeling the precipitation flow relationship. Hsu et al. [1] used

Methods
Multiple Linear Regression (MLR), Adaptive Neuro-Fuzzy Inference System (ANFIS), Mamdani-Fuzzy Logic (M-FL), M5 Decision Tree (M5T), Artificial Neural Network (ANN) and Fuzzy Rules Generation Technique (SMRGT) models were chosen in estimating the river flow. In all models, daily precipitation (P), water temperature (T), and lagged 1-day flow (Qt − 1) parameters were used for the estimation of the river flow (Qt). In this study, the inputs affecting the river flow were investigated and the parameters giving the best optimal performance in the model were selected according to the trial result.

Multiple Linear Regression (MLR)
It is a method used to find out how much a dependent variable is affected and the value of the independent variables affected.
Dependent variable y can be expressed in terms of independent variables of x1, x2, ..., xp and the relationship between them is written as in the equation below; y = a 0 + a 1 x 1 + a 2 x 2 + ⋯ + a p x p + ε In Equation (1), a0, a1, a2, …, ap are called regression coefficients. ε is the error component reflecting the difference between the real dependent variable (y) and the fitted linear regression relationship. Any regression coefficient ap gives the expected amount of change in the y variable versus one-unit change in xp when other variables are held constant, that is, when other variables have no effect. In other words; a0, a1, a2, …, ap are the weights of the relative contribution of the independent variables to the determination of y. Therefore, ap is often referred to as a partial regression coefficient. a0 is called a breakpoint or constant and represents the value of the dependent variable when all xp variable values are zero.

Artificial Neural Network (ANN) Model
Artificial neural networks (ANN) are systems consisting of process elements that are connected to each other with different weights that are inspired by the structure of nerve cells in the human brain. Among the artificial neural network (ANN) methods, the most commonly used method is the

Multiple Linear Regression (MLR)
It is a method used to find out how much a dependent variable is affected and the value of the independent variables affected.
Dependent variable y can be expressed in terms of independent variables of x 1 , x 2 , ..., x p and the relationship between them is written as in the equation below; y = a 0 + a 1 x 1 + a 2 x 2 + . . . + a p x p + ε In Equation (1), a 0 , a 1 , a 2 , . . . , a p are called regression coefficients. ε is the error component reflecting the difference between the real dependent variable (y) and the fitted linear regression relationship. Any regression coefficient a p gives the expected amount of change in the y variable versus one-unit change in x p when other variables are held constant, that is, when other variables have no effect. In other words; a 0 , a 1 , a 2 , . . . , a p are the weights of the relative contribution of the independent variables to the determination of y. Therefore, a p is often referred to as a partial regression coefficient. a 0 is called a breakpoint or constant and represents the value of the dependent variable when all x p variable values are zero.

Artificial Neural Network (ANN) Model
Artificial neural networks (ANN) are systems consisting of process elements that are connected to each other with different weights that are inspired by the structure of nerve cells in the human brain. Among the artificial neural network (ANN) methods, the most commonly used method is the feed-forward back-propagation ANN model, which operates according to the principle of back propagation of errors. An artificial neural network cell consists of five main parts: the input layer, variable weight multipliers, total function, activation function, and output layer. In Figure 3, a schematic diagram of a three-layer artificial neural network is given. According to Figure 3, the river flow time series (Q t − 1 ), water temperature (T t ) and Precipitation (P t ) were used to estimate the river flow (Q t ). The time series is used for estimating the river flow in dry periods when there is no rain affecting the river basin.
propagation of errors. An artificial neural network cell consists of five main parts: the input layer, variable weight multipliers, total function, activation function, and output layer. In Figure 3, a schematic diagram of a three-layer artificial neural network is given. According to Figure 3, the river flow time series (Qt − 1), water temperature (Tt) and Precipitation (Pt) were used to estimate the river flow (Qt). The time series is used for estimating the river flow in dry periods when there is no rain affecting the river basin. In Figure 3, Wij and Wjk, respectively, represent the weight of the connection between the input, hidden and output layers, and "b" is the bias term. Output estimation values for ANN are obtained by adding the bias multiplied by the input values and weighted averages (w). These values are coefficient values that express the effect of the previous input data on the treated element. These coefficients, which initially receive random weight values, constantly vary during the training phase by comparing the predictive outputs to the actual outputs, and the error amounts are propagated backward until the link weight values are adjusted to minimize errors. In this study, the feedback propagation ANN method was used. The technique updates the weights and bias values according to the Levenberg-Marquardt optimization. It minimizes a combination of squared errors and weights, and then determines. As a transfer function; "tansig" was used for the hidden layer, "purelin" was used for the output layer and "trainlm" was used for Back-propagation network training. In addition, the number of epochs was 1000, the momentum coefficient was 0.80, and the learning rate refresh coefficient was 1.15. The ANN model consisted of 3 inputs, 1 hidden layer with 6 nodes, and 1 output layer ( Figure 3).

M5 Decision Tree Model (M5T)
Decision trees are a tree-shaped decision structure type whose classes are learned by using the induction method from the sample data. A decision tree is a structure used by applying simple decision steps, dividing large amounts of records into very small groups of records. With each successful division operation, members of the result groups become much more similar to each other. Decision trees are a useful solution in many classification problems using complex databases and in complex or erroneous information. Decision trees, which have predictive and descriptive features, are the most widely used technique among the classification models due to their easy installation, easy interpretation, easy integration into database systems, and their better reliability. The dividing criterion is based on the standard deviation of the subset values. The mathematical formula for calculating standard deviation reduction (SDR) is: Figure 3. Schematic diagram of a three-layer ANN that was used in this study.
In Figure 3, W ij and W jk , respectively, represent the weight of the connection between the input, hidden and output layers, and "b" is the bias term. Output estimation values for ANN are obtained by adding the bias multiplied by the input values and weighted averages (w). These values are coefficient values that express the effect of the previous input data on the treated element. These coefficients, which initially receive random weight values, constantly vary during the training phase by comparing the predictive outputs to the actual outputs, and the error amounts are propagated backward until the link weight values are adjusted to minimize errors. In this study, the feedback propagation ANN method was used. The technique updates the weights and bias values according to the Levenberg-Marquardt optimization. It minimizes a combination of squared errors and weights, and then determines. As a transfer function; "tansig" was used for the hidden layer, "purelin" was used for the output layer and "trainlm" was used for Back-propagation network training. In addition, the number of epochs was 1000, the momentum coefficient was 0.80, and the learning rate refresh coefficient was 1.15. The ANN model consisted of 3 inputs, 1 hidden layer with 6 nodes, and 1 output layer ( Figure 3).

M5 Decision Tree Model (M5T)
Decision trees are a tree-shaped decision structure type whose classes are learned by using the induction method from the sample data. A decision tree is a structure used by applying simple decision steps, dividing large amounts of records into very small groups of records. With each successful division operation, members of the result groups become much more similar to each other. Decision trees are a useful solution in many classification problems using complex databases and in complex or erroneous information. Decision trees, which have predictive and descriptive features, are the most widely used technique among the classification models due to their easy installation, easy interpretation, easy integration into database systems, and their better reliability. The dividing criterion is based on the standard deviation of the subset values. The mathematical formula for calculating standard deviation reduction (SDR) is: In Equation (2), T represents a group of samples reaching the node, T i represents a subset of samples that are the result of the potential cluster, and SD represents the standard deviation. After examining all possible structures, a structure that has the maximum expected error reduction would be picked out. This dividing process often creates a great tree-like structure that leads to an overfit structure. A general M5 tree is given in Figure 4.
In Equation (2), T represents a group of samples reaching the node, Ti represents a subset of samples that are the result of the potential cluster, and SD represents the standard deviation. After examining all possible structures, a structure that has the maximum expected error reduction would be picked out. This dividing process often creates a great tree-like structure that leads to an overfit structure. A general M5 tree is given in Figure 4.

Mamdani Fuzzy Logic (M-FL) Model
The Mamdani system was first studied (Mamdani and Assilian, [32]) in 1975. This system is characterized as very convenient due to its proximity to human behavior among fuzzy logic modeling systems. It is the ancestor of all fuzzy logic models. Its simplicity in modeling has expanded the use of the Mamdani system. It has been used to try to facilitate the solution of the problems through verbal expression, thanks to the fuzzy logic of the models that are not fully known numerically or that have mixed equations. Fuzzy inference is how input or input groups are associated with an output using the fuzzy logic method.
In fuzzy logic models, connections between inputs and outputs are provided using rules in the rule base. A fuzzy logic controller consists of three basic parts: fuzzification, a rule-based extraction mechanism, and defuzzification. A typical example of a "Mamdani-Fuzzy Logic" starts as follows. Input parameters are created for model analysis and the fuzzification process is started. Fuzzy sets ranging from 0-1 are created for each input parameter. These clusters can have different shapes such as triangle, trapezoidal or curvilinear. Then, with our input-output parameters, rules such as fuzzy "If-Then rules" are created. It rinses with the rinsing process, digitizing our fuzzy data and printing. The flow chart of all these processes is shown in Figure 5.

Mamdani Fuzzy Logic (M-FL) Model
The Mamdani system was first studied (Mamdani and Assilian, [32]) in 1975. This system is characterized as very convenient due to its proximity to human behavior among fuzzy logic modeling systems. It is the ancestor of all fuzzy logic models. Its simplicity in modeling has expanded the use of the Mamdani system. It has been used to try to facilitate the solution of the problems through verbal expression, thanks to the fuzzy logic of the models that are not fully known numerically or that have mixed equations. Fuzzy inference is how input or input groups are associated with an output using the fuzzy logic method.
In fuzzy logic models, connections between inputs and outputs are provided using rules in the rule base. A fuzzy logic controller consists of three basic parts: fuzzification, a rule-based extraction mechanism, and defuzzification. A typical example of a "Mamdani-Fuzzy Logic" starts as follows. Input parameters are created for model analysis and the fuzzification process is started. Fuzzy sets ranging from 0-1 are created for each input parameter. These clusters can have different shapes such as triangle, trapezoidal or curvilinear. Then, with our input-output parameters, rules such as fuzzy "If-Then rules" are created. It rinses with the rinsing process, digitizing our fuzzy data and printing. The flow chart of all these processes is shown in Figure 5. There are two fuzzy inference systems most commonly known in the literature. These inferences are Mamdani and Takagi-Sugeno (Adaptive Neuro-Fuzzy Inference System, ANFIS). Mamdani's fuzzy inference method is the most commonly used fuzzy method. The Mamdani inference system takes output membership functions as fuzzy sets. A fuzzy set occurs for each output. Fuzzification is There are two fuzzy inference systems most commonly known in the literature. These inferences are Mamdani and Takagi-Sugeno (Adaptive Neuro-Fuzzy Inference System, ANFIS). Mamdani's fuzzy inference method is the most commonly used fuzzy method. The Mamdani inference system takes output membership functions as fuzzy sets. A fuzzy set occurs for each output. Fuzzification is indispensable for achieving precise results. This approach is suitable for verbal expressions and when there is not a lot of data. In contrast to Mamdani, the ANFIS (Takagi-Sugeno, [33]) approach uses only numerical data and verbal data cannot be entered. From this point, the ANFIS approach is a data-driven method and gives better results when digital input-output data is provided. ANFIS operates according to the "If-Then" rule and the structure uses the Sugeno fuzzy rules. According to the "if-Then" rule, if x is A1, y is B1; where A1 and B1 are linguistic values defined by fuzzy sets. It is possible to introduce fuzzy systems with logical models consisting of "If-Then" membership rules and membership functions.
Mamdani inference is known as the first control system established by the fuzzy set theory. Mamdani was able to control the combination of the steam engine and boiler by reviewing a set of linguistic control rules found by professional human operators (Mamdani,[34]). His work was based on Zadeh's study (Zadeh,[9]) on complex systems and fuzzy algorithms for decision-making. The inference process is different from Zadeh's work, but the basic idea is the same (MathWorks, [35]). Due to Mamdani and Assilian, [32] the first inference method is the most common in practice and literature. To understand the Mamdani structure, we consider a simple two-rule system, where each rule contains two premises and one conclusion. This is similar to a fuzzy system with a double input and a single output. A fuzzy system with two inputs, x 1 and x 2 (premise), and a single output, y (as a result), is explained by a collection of linguistic IF-THEN proposals in Mamdani form: where A n 1 and A n 2 are the fuzzy sets representing the kth antecedent pairs and B n 1 is the fuzzy set representing the consequent. In this study, 3 different "LOW", "MEDIUM" and "HIGH" subsets were determined separately for the water temperature, precipitation, and flow parameters according to Figure 6 and the following rules were created. IF Temperature is "LOW" and Precipitation is "MEDIUM" THEN Flow is "HIGH" (4) Water 2020, 12, x FOR PEER REVIEW 8 of 22 (a)  In Mamdani inference, the result of the "if-Then" rule is defined by a fuzzy set. The fuzzy output set of each rule is reshaped by a matching number in the system, and all of the fuzzy sets obtained as a result of this reshaping must be collected and then rinsed (Wang, [35]). Mamdani Fuzzy Logic has advantages such as proximity to intuitive human perception and logic (MathWorks, [36]). Mamdani's advantage over Sugeno's works is to expand Mamdani's current model, that is, the multi-output model [37].
According to Figure 6, triangular membership functions are used for water temperature, precipitation and flow. The fuzzy subset was tried and determined separately.

Adaptive Neuro-Fuzzy Inference System (ANFIS) Model
This method, also known as the Sugeno type Fuzzy system, consists of a combination of the fuzzy inference system (FIS) and artificial neural networks (ANN). ANFIS systems are the same as Mamdani type fuzzy systems and there are differences in the output result system.
Numerical data cannot be found directly after the output unit of fuzzy systems. The inability to obtain numerical data as a result of fuzzy systems makes it difficult to use the systems from an engineering point of view. Since the printouts are fuzzied in their original form, they cannot be used directly in engineering models. Various studies have been carried out by Takagi and Sugeno [33] and Sugeno-Kank [38] in order to use the fuzzy systems in the equations established with Aristotle's logic. Figure 7 shows the Takagi-Sugeno-Kank model.
This method, also known as the Sugeno type Fuzzy system, consists of a combination of the fuzzy inference system (FIS) and artificial neural networks (ANN). ANFIS systems are the same as Mamdani type fuzzy systems and there are differences in the output result system. Numerical data cannot be found directly after the output unit of fuzzy systems. The inability to obtain numerical data as a result of fuzzy systems makes it difficult to use the systems from an engineering point of view. Since the printouts are fuzzied in their original form, they cannot be used directly in engineering models. Various studies have been carried out by Takagi and Sugeno [33] and Sugeno-Kank [38] in order to use the fuzzy systems in the equations established with Aristotle's logic. Figure 7 shows the Takagi-Sugeno-Kank model. In the Takagi-Sugeno-Kank system, the entrance and fuzzification steps are the same as the Mamdani system. The difference is observed in the output functions. The output functions in this system are fixed or linear. One output data is obtained for each rule. This system is very suitable for mathematical analysis, but it has been observed that it is more unsuccessful than Mamdani in showing an affinity to human behavior.

Simple Membership Functions and Fuzzy Rules Generation Technique (SMRGT)
For the SMRGT method, firstly, dependent and independent variables are determined. In this study, the determination of dependent variables, such as air temperature, precipitation, and the flow variable, was attempted. The minimum and maximum upper limits of these variables were determined and fuzzy clusters (high, medium, low) were determined accordingly. Shapes of the membership functions (triangle, trapeze) were decided. Triangular membership functions are generally preferred in the literature. Then, by determining the unit width, core, and key values of each triangle membership function, membership function processes are completed. During the training process, fuzzy rules are created for each parameter and the process of getting results is started. The flow chart of SMRGT is represented in Figure 8. Researchers can examine more information about SMRGT in Altaş et al. [39], Toprak [40] and Toprak et al. [41,42] 's works. In the Takagi-Sugeno-Kank system, the entrance and fuzzification steps are the same as the Mamdani system. The difference is observed in the output functions. The output functions in this system are fixed or linear. One output data is obtained for each rule. This system is very suitable for mathematical analysis, but it has been observed that it is more unsuccessful than Mamdani in showing an affinity to human behavior.

Simple Membership Functions and Fuzzy Rules Generation Technique (SMRGT)
For the SMRGT method, firstly, dependent and independent variables are determined. In this study, the determination of dependent variables, such as air temperature, precipitation, and the flow variable, was attempted. The minimum and maximum upper limits of these variables were determined and fuzzy clusters (high, medium, low) were determined accordingly. Shapes of the membership functions (triangle, trapeze) were decided. Triangular membership functions are generally preferred in the literature. Then, by determining the unit width, core, and key values of each triangle membership function, membership function processes are completed. During the training process, fuzzy rules are created for each parameter and the process of getting results is started. The flow chart of SMRGT is represented in Figure 8. Researchers can examine more information about SMRGT in Altaş et al. [39], Toprak [40] and Toprak et al. [41,42] 's works.
For the prediction model, the unit width (UW), core value (C i ), and key values (K i ) of the fuzzy sets were determined (Figure 9). In order to determine these values, the change interval (VR) of the metrics must be known first. The lowest and highest values of the metrics specified in the second stage were used to determine the change interval. Equation (5) shows the change interval (VR) formula. The parameters used to create membership functions are calculated by the following equations [39][40][41].
In this paper, calculations were made for minimum and maximum values in the training process for Temperature (T), Rainfall (P) and Flow (Q) values. The nu value used in these equations indicates the total number of right triangles. According to Figure 9, there are two right triangle membership functions in the sides and 2 in the middle (1 isosceles triangle). Calculations for UW, O, EUW, K 1 , K 2 values were performed with the Equations (7)-(11) below.
K 1 = (T, P, Q) min + EUW 3 (10) Equations between (Equations (7) and (11)) were used to construct the SMRGT model 1 with borders of membership function and key values. According to Figure 9, the "K 1 , K 1 + UW, K 2 -UW and K 2 " values represent the selected triangle membership/cluster limit values. "UW" indicates the unit width and n u is the number of right-angled triangles. The expanded base width (EUW) is needed to find the "K 1 , K 2 " limit values and to prevent neighbouring clusters from being nested. The "O" value is an expression used to find the EUW, K 1 and K 2 values.  For the prediction model, the unit width (UW), core value (Ci), and key values (Ki) of the fuzzy sets were determined (Figure 9). In order to determine these values, the change interval (VR) of the metrics must be known first. The lowest and highest values of the metrics specified in the second stage were used to determine the change interval. Equation (5) shows the change interval (VR) formula. The parameters used to create membership functions are calculated by the following equations [39][40][41]. sets were determined (Figure 9). In order to determine these values, the change interval (VR) of the metrics must be known first. The lowest and highest values of the metrics specified in the second stage were used to determine the change interval. Equation (5) shows the change interval (VR) formula. The parameters used to create membership functions are calculated by the following equations [39][40][41]. For the SMRGT method, 7 subset membership functions were selected. It was observed that the number of errors decreased as the number of memberships increased. In the SMRGT method, the limit values (Figures 10-12) were calculated manually.
Water 2020, 12, x FOR PEER REVIEW 11 of 22 In this paper, calculations were made for minimum and maximum values in the training process for Temperature (T), Rainfall (P) and Flow (Q) values. The nu value used in these equations indicates the total number of right triangles. According to Figure 9, there are two right triangle membership functions in the sides and 2 in the middle (1 isosceles triangle). Calculations for UW, O, EUW, K1, K2 values were performed with the Equations (7)-(11) below.
K 1 = (T, P, Q) min + EUW 3 (10) Equations between (Equations (7) and (11)) were used to construct the SMRGT model 1 with borders of membership function and key values. According to Figure 9, the "K1, K1 + UW, K2-UW and K2" values represent the selected triangle membership/cluster limit values. "UW" indicates the unit width and nu is the number of right-angled triangles. The expanded base width (EUW) is needed to find the "K1, K2" limit values and to prevent neighbouring clusters from being nested. The "O" value is an expression used to find the EUW, K1 and K2 values.
After determining the ranges and structure of the Membership Functions (MFs), the functions of the SMRGT model are given in Figures 10-12.   In this paper, calculations were made for minimum and maximum values in the training process for Temperature (T), Rainfall (P) and Flow (Q) values. The nu value used in these equations indicates the total number of right triangles. According to Figure 9, there are two right triangle membership functions in the sides and 2 in the middle (1 isosceles triangle). Calculations for UW, O, EUW, K1, K2 values were performed with the Equations (7)-(11) below.
K 1 = (T, P, Q) min + EUW 3 (10) Equations between (Equations (7) and (11)) were used to construct the SMRGT model 1 with borders of membership function and key values. According to Figure 9, the "K1, K1 + UW, K2-UW and K2" values represent the selected triangle membership/cluster limit values. "UW" indicates the unit width and nu is the number of right-angled triangles. The expanded base width (EUW) is needed to find the "K1, K2" limit values and to prevent neighbouring clusters from being nested. The "O" value is an expression used to find the EUW, K1 and K2 values.
After determining the ranges and structure of the Membership Functions (MFs), the functions of the SMRGT model are given in Figures 10-12.    For the SMRGT method, 7 subset membership functions were selected. It was observed that the number of errors decreased as the number of memberships increased. In the SMRGT method, the limit values (Figures 10-12) were calculated manually.
Essentially, the SMRGT model is also made with the fuzzy-Mamdani technique. However, fuzzy sub-sets are chosen randomly with the conscientious technique and this makes modeling and model education difficult. However, in the SMRGT model, the fuzzy subset and variable ranges are selected based on observations and experiences. This approach technique makes it easier and more convenient to reflect the physics of the event to the fuzzy model.

Results and Discussion
In this study, the flow rate in the river was estimated by using artificial intelligence techniques and Multi Linear Regression methods. The results were compared with each other. A total of 1095 data belonging to the years 2014-2017 were used in the station. Overall, 75% of all data was used for training and 25% was used for the testing. Daily Temperature (Tt), precipitation (Pt) and lagged day flow rate (Qt − 1) were used for estimating the flow (Qt) in the river. In all models, 820 data were trained and 275 data were applied during the test phase.
In order to determine the success of the models used to estimate the flow value in the river, MSE (square error) MAE (mean absolute error) and R (correlation coefficient), given in Equation (12) [43] and Equation (13) [44], were used. Here n represents the number of data for the flow amounts of Q.
The performance of the model results is shown in Table 1. When Table 1 was examined, all models gave similar results. According to the MSE, MAE, and R criteria, the best results were obtained in the M-FL and SMRGT models. The M5T models gave the worst results in all criteria.  Essentially, the SMRGT model is also made with the fuzzy-Mamdani technique. However, fuzzy sub-sets are chosen randomly with the conscientious technique and this makes modeling and model education difficult. However, in the SMRGT model, the fuzzy subset and variable ranges are selected based on observations and experiences. This approach technique makes it easier and more convenient to reflect the physics of the event to the fuzzy model.

Results and Discussion
In this study, the flow rate in the river was estimated by using artificial intelligence techniques and Multi Linear Regression methods. The results were compared with each other. A total of 1095 data belonging to the years 2014-2017 were used in the station. Overall, 75% of all data was used for training and 25% was used for the testing. Daily Temperature (T t ), precipitation (P t ) and lagged day flow rate (Q t − 1 ) were used for estimating the flow (Q t ) in the river. In all models, 820 data were trained and 275 data were applied during the test phase.
In order to determine the success of the models used to estimate the flow value in the river, MSE (square error) MAE (mean absolute error) and R (correlation coefficient), given in Equation (12) [43] and Equation (13) [44], were used. Here n represents the number of data for the flow amounts of Q.
The performance of the model results is shown in Table 1. When Table 1 was examined, all models gave similar results. According to the MSE, MAE, and R criteria, the best results were obtained in the M-FL and SMRGT models. The M5T models gave the worst results in all criteria. Daily water Temperature (T t ), Precipitation (P t ) and lagged day flow rate (Q t − 1 ) were used for MLR flow (Q t ) estimations. The MLR model established using training data is given in Equation (14). This equation was also applied to test data.
MLR model variation and scatter graphs are given in Figure 13. When scatter graphs for testing data were analyzed, the correlation coefficient was obtained as R: 0.902 and MLR values were seen to be close to the actual values. Daily water Temperature (Tt), Precipitation (Pt) and lagged day flow rate (Qt − 1) were used for MLR flow (Qt) estimations. The MLR model established using training data is given in Equation (14). This equation was also applied to test data.
MLR model variation and scatter graphs are given in Figure 13. When scatter graphs for testing data were analyzed, the correlation coefficient was obtained as R: 0.902 and MLR values were seen to be close to the actual values. Feedback propagation network is used for ANN. ANN model results for flow estimation are given in Figure 14. When the variation graph in Figure 14 was examined, it was seen that the measurement and estimation results were similar to each other as in the other models. When the scatter graph in Figure 14 was examined, it was seen that the correlation coefficient was 0.907. Feedback propagation network is used for ANN. ANN model results for flow estimation are given in Figure 14. When the variation graph in Figure 14 was examined, it was seen that the measurement and estimation results were similar to each other as in the other models. When the scatter graph in Figure 14 was examined, it was seen that the correlation coefficient was 0.907.
(b) Figure 13. Observed and MLR model for river flow test data: (a) variation graph, (b) scatter graph.
Feedback propagation network is used for ANN. ANN model results for flow estimation are given in Figure 14. When the variation graph in Figure 14 was examined, it was seen that the measurement and estimation results were similar to each other as in the other models. When the scatter graph in Figure 14 was examined, it was seen that the correlation coefficient was 0.907. The variation and scatter graphs of M5 decision tree (M5T) model results are given in Figure 15. When the graphs were examined, it was seen that there was a good correlation between the measurement results and the estimation results. Although the correlation coefficient was R: 0.878, it showed the worst performance with the lowest correlation among all models. The variation and scatter graphs of M5 decision tree (M5T) model results are given in Figure 15. When the graphs were examined, it was seen that there was a good correlation between the measurement results and the estimation results. Although the correlation coefficient was R: 0.878, it showed the worst performance with the lowest correlation among all models. The variation and scatter graphs of M5 decision tree (M5T) model results are given in Figure 15. When the graphs were examined, it was seen that there was a good correlation between the measurement results and the estimation results. Although the correlation coefficient was R: 0.878, it showed the worst performance with the lowest correlation among all models. In ANFIS analysis, Gaussian parabolic 3 × 3 × 3 Membership Functions (MFs) and Grid partition section were analyzed with 100 iterations, assuming the output as linear. Variation and scatter graphs for the ANFIS method are shown in Figure 16. The correlation coefficient is seen as R: 0.903 in Figure  16. As seen in the figure, ANFIS results were close to the observed values. As shown in Table 1, ANFIS and MLR methods had similar correlations (R: 0.902). When we look at the MSE and MAE criteria, they have similar low error rates. In ANFIS analysis, Gaussian parabolic 3 × 3 × 3 Membership Functions (MFs) and Grid partition section were analyzed with 100 iterations, assuming the output as linear. Variation and scatter graphs for the ANFIS method are shown in Figure 16. The correlation coefficient is seen as R: 0.903 in Figure 16. As seen in the figure, ANFIS results were close to the observed values. As shown in Table 1, ANFIS and MLR methods had similar correlations (R: 0.902). When we look at the MSE and MAE criteria, they have similar low error rates.
In ANFIS analysis, Gaussian parabolic 3 × 3 × 3 Membership Functions (MFs) and Grid partition section were analyzed with 100 iterations, assuming the output as linear. Variation and scatter graphs for the ANFIS method are shown in Figure 16. The correlation coefficient is seen as R: 0.903 in Figure  16. As seen in the figure, ANFIS results were close to the observed values. As shown in Table 1, ANFIS and MLR methods had similar correlations (R: 0.902). When we look at the MSE and MAE criteria, they have similar low error rates. The scatter and variation graphs of the M-FL method are shown in Figure 17. When the variation graph was examined, it was seen that the predicted values gave closer results to the actual values. The scatter diagram also shows a high correlation between the actual values and the estimated values. Compared to all models, it can be seen from Table 1  The scatter and variation graphs of the M-FL method are shown in Figure 17. When the variation graph was examined, it was seen that the predicted values gave closer results to the actual values. The scatter diagram also shows a high correlation between the actual values and the estimated values. Compared to all models, it can be seen from Table 1  Simple Membership Functions and Fuzzy Rules Generation Technique (SMRGT) model results for flow estimation are given in Figure 18. When the variation graph in Figure 18 was examined, it was seen that the predicted values gave closer results to the actual values. When the scatter graph in Figure 18 was examined, it was seen that the correlation coefficient was 0.927. In Table 1, it was found that the SMRGT model showed the best performance among all models followed by the M-FL model. Compared to all models, it can be seen from Table 1 Figure 18. When the variation graph in Figure 18 was examined, it was seen that the predicted values gave closer results to the actual values. When the scatter graph in Figure 18 was examined, it was seen that the correlation coefficient was 0.927. In Table 1, it was found that the SMRGT model showed the best performance among all models followed by the M-FL model. Compared to all models, it can be seen from Table 1  for flow estimation are given in Figure 18. When the variation graph in Figure 18 was examined, it was seen that the predicted values gave closer results to the actual values. When the scatter graph in Figure 18 was examined, it was seen that the correlation coefficient was 0.927. In Table 1, it was found that the SMRGT model showed the best performance among all models followed by the M-FL model. Compared to all models, it can be seen from Table 1  As is known, ANN, M5 Tree and ANFIS models are black-box models. They cannot adequately consider the physics of the event between input and output. However, the Fuzzy Mamdani and SMRGT models presented in this study offer the opportunity to reflect the physics of the event to the model using measurement changes, experience, and knowledge. It was observed that the 275 data used in the testing of the models did not reach the flow peak values in all models at approximately five extraordinary flood flow rates. Therefore, it was observed that the correlation values decreased.

Conclusions
In this study, daily average water temperature, precipitation, and lagged day flow values were used for flow prediction.  As is known, ANN, M5 Tree and ANFIS models are black-box models. They cannot adequately consider the physics of the event between input and output. However, the Fuzzy Mamdani and SMRGT models presented in this study offer the opportunity to reflect the physics of the event to the model using measurement changes, experience, and knowledge. It was observed that the 275 data used in the testing of the models did not reach the flow peak values in all models at approximately five extraordinary flood flow rates. Therefore, it was observed that the correlation values decreased.

Conclusions
In this study, daily average water temperature, precipitation, and lagged day flow values were used for flow prediction. According to the MSE, MAE, and R criteria, the worst results were obtained in the M5T model. The MLR, ANN, and ANFIS results were closer to each other. The best results were obtained in the M-FL and SMRGT models. Compared to all models, the SMRGT model results had the lowest error rates and the highest correlation. As a result of this study, the SMRGT methods are recommended for future hydrological and water resources analysis.
The rainfall flow relationship is a multivariate nonlinear event. For this reason, it is very difficult to accurately determine all parameters, and parametric modeling of precipitation-flow relationship. The new artificial intelligence techniques in the presented study are thought to be used in determining the relationship between precipitation flow depending on past seasonal parameters.