Using soft computing and machine learning algorithms to predict the discharge coefficient of curved labyrinth overflows

This research aims to estimate the overflow capacity of a curved labyrinth using different intelligent prediction models, namely the adaptive neural-fuzzy inference system, the support vector machine, the M5 model tree, the least-squares support vector machine and the least-squares support vector machine–bat algorithm (LSSVM-BA). A total of 355 empirical data for 6 different congressional overflow models were extracted from the results of a laboratory study on labyrinth overflow models. The parameters of the upstream water head to overflow ratio, the lateral wall angle and the curvature angle were used to estimate the discharge coefficient of curved labyrinth overflows. Based on various statistical evaluation indicators, the results show that those input parameters can be relied upon to predict the discharge coefficient. Specifically, the LSSVM-BA model showed the best prediction accuracy during the training and test phases. Such a low-cost prediction model may have a remarkable practical implication as it could be an economic alternative to the expensive laboratory solution, which is costly and time-consuming.


Introduction
Labyrinth overflows are one of the most important structures used to regulate water levels and control flow in rivers and canals. The use of a labyrinth overflow can be considered as an effective and economical solution, especially if the construction site of the overflow is limited in width and water level upstream. By increasing the length of the crown to a certain width, labyrinth overflows can pass more flow for the same hydraulic load. Accordingly, forecasting the discharge coefficient and the efficiency of this type of overflow have captured the interest of researchers and encouraged them to explore advanced experimental methods that help predict the discharge coefficient and seek the optimal geometry that leads to more efficient labyrinth overflows. The hydraulics of labyrinth overflows were first investigated by Gentilini (1941). The design of this type of overflow was developed by Taylor (1968). Tullis et al. (1995) evaluated many parameters to find the most effective ones for estimating the amount of labyrinth overflow discharge. They also examined the dimensionless relationship of CONTACT Shahab S. Band shamshirbands@yuntech.edu.tw; Md. Jalil Piran piran@sejong.ac.kr the submerged water head to the labyrinth overflow and established a relationship between the water head and the discharge at the labyrinth overflow. Their results showed that, when the ratio of the total head of water upstream to the total head of water downstream (in the case of a submerged overflow) is greater than 0.5, the submerged flow conditions are affected by the water head upstream (Tullis et al., 2007). In another study, Kumar et al. (2011) worked on estimating the overflow capacity of triangular labyrinth overflows. By examining the hydraulic performance of curved trapezoidal labyrinth overflows in plan, Crookston and Tullis (2012) found that the discharge coefficient of this type of overflow is a function of the ratio of the upstream water head to the height of the overflow. In a laboratory study, Noori and Aaref (2017) analyzed the performance of a circular-crowned labyrinth overflow. They observed that the discharge coefficient is a function of the water head upstream of the overflow, and that increasing the dimensionless parameter of the water head to the height of the overflow reduces the discharge coefficient. In addition to laboratory work, recent studies have shown that the use of contemporary intelligent algorithms can be used as models to understand the dynamics of labyrinth overflows. For example, Roushangar et al. (2018) studied the discharge coefficient of labyrinth overflows and arched labyrinth overflows using the support vector machine (SVM) algorithm and concluded that this method has a high accuracy for predicting the discharge coefficient of labyrinth overflows. In a study conducted by Akhbari et al. (2017), they found that the M5 method gives better performance with respect to predicting the discharge coefficient of labyrinth overflows compared to the radial base neural networks (RBNN) method. Olyaie et al. (2018) used the feed-forward back-propagation neural network (FFBPN), gene-expression programming (GEP), least-squares support vector machine (LSSVM) and extreme learning machine (ELM) methods to predict the discharge coefficient of piano-key overflows. They found that the LSSVM and ELM methods were the top performers. Shafiei et al. (2020) used the evolutionary firefly algorithm (FFA) algorithm to optimize the membership functions of the adaptive neural-fuzzy inference system (ANFIS) model and observed that the ANFIS-FFA model was significantly more accurate than the ANFIS model in estimating the discharge coefficient of labyrinth overflows. Mahmoud et al. (2021a) utilized a hybrid MLP-firefly algorithm (MLP-FFA) to estimate the discharge coefficient of labyrinth spillways. The outcomes indicated that the proposed methods demonstrated higher performance in the training and testing stages. In another work, Mahmoud et al. (2021b) estimated the flowrate of a sharp-crest triangular labyrinth weir as a function of its side leg angle α and total head ratio (H/P) through several soft computing techniques. They concluded that the competence of soft computing techniques in the testing stage cannot guarantee their accuracy in the interpolation task. Basser et al. (2014) compared two support vector regression types, namely polynomial-based (SVR_poly) and RBF-based SVR (SVR_rbf) with the Adaptive Neuro-Fuzzy System (ANFIS) and Artificial Neural Network (ANN) algorithms to estimate the best parameters for a protective spur dike. The results showed that combination methods achieved the best performance in terms of percentage reduction in the scour depth with a smaller network size. Karami et al. (2017) predicted the discharge capacity in triangular labyrinth side-weirs using several hybrid machine learning methods. The SVR-FFA model indicated the highest ability among the models. Hassanvand et al. (2018) studied flood routing using the bat algorithm and the imperialist competitive algorithm (ICA) to optimize the structure of ANN models. They observed that the ANN-ICA model predicted the hydrograph volume, peak flow and flood time more accurately. Dianatikhah et al. (2020) utilized the kidney algorithm to increase the generation of energy in a multi-reservoir for its operation. It achieved a high convergence rate. Sun et al. (2021) utilized SVR optimized with fruitfly optimization algorithms (FOAs) to predict the scour hole pattern in the equilibrium phase. Other researchers applied the sunflower optimization (SO) algorithm with ANFIS and ANN for lake water level simulation. They observed that the ANFIS-SO model had the most accurate performance (Ehteram et al., 2021;Mahdavi-Meymand et al., 2019;Zhou et al., 2019).
The state of the art indicates that the use of intelligent models in predicting various hydraulic phenomena, especially in recent years, has received much attention (Mahdavi-Meymand et al., 2019;Zhou et al., 2019). Some studies focused on predicting the discharge coefficient of linear labyrinth overflows, but a few studies were concerned with predicting the discharge coefficient of curved labyrinth overflows, which have better hydraulic performance than linear labyrinth overflows (Yildiz & Uzucek, 1996). Note that, in curved labyrinth overflows, the angle of the overflow (θ ) is deemed an important parameter for predicting the discharge coefficient, which is a constant in linear labyrinth overflows, and this parameter is not considered in predicting the discharge coefficient of linear labyrinth overflows (Sangsefidi et al., 2018). Therefore, predicting the discharge coefficient of this overflow model with different angles of curvature is crucial for designers. Also, reviewing previous studies shows that hybrid algorithms are successful in predicting problems related to water and hydraulic structures. Therefore, in the present study, for the first time, we predict the throughput coefficient of a curved labyrinth overflow using the new least-squares support vector machine-bat algorithm (LSSVM-BA) hybrid model. To confirm the performance of this algorithm, we use powerful simulation algorithms such as ANFIS, M5, SVM and LSSVM, each one of which has a special performance.
The rest of the paper is structured as follows. In Section 2, we give a brief description of the various soft computing algorithms we used in addition to the hybrid LSSVM-BA model that we introduce. We also explain the empirical data used in this research and the statistical tools by which we evaluate the various prediction models. In Section 3, we provide an analysis of the data and discuss the performance indicators through a comprehensive set of performance diagrams. We conclude and highlight our contributions in the final section.

Materials and methods
This section describes the methodology and dataset used in this study. We give a brief description of each of the soft computing algorithms we used in this work, namely the ANFIS, SVM, M5, LSSVM and LSSVM-BA algorithms, to estimate the discharge coefficient of a labyrinth overflow.

Adaptive neuro fuzzy inference system (ANFIS)
The theory of fuzzy sets was proposed by Zadeth (1965) at Berkeley University in the United States. Fuzzy theory is capable of establishing mathematical formulations of many concepts, variables and complex and ambiguous systems, and provides the basis for reasoning, inference, control and decision-making in conditions of uncertainty. The adaptive neuro-fuzzy inference system uses neural network learning and fuzzy logic algorithms to design a nonlinear mapping between input and output space.
The ANFIS method was introduced by Jang (1993). The ANFIS structure has five layers, including input, base, middle, defuzzification layer and summation layer, and are directly related to each other. Each node has a function with adjustable or fixed parameters. The appropriate structure is selected based on input data, membership rank, input, and output membership rules and functions. In the training phase, by modifying the membership degree parameters based on the acceptable error rate, the input values are closer to the actual values. The ANFIS technique uses neural network learning algorithms and fuzzy logic to design nonlinear mapping between input and output space and has good training, fabrication and classification capabilities. It also has the advantage of allowing the extraction of fuzzy rules from numerical information or expert knowledge and comparatively forming a rule-foundation. In addition, it can regulate the complex transformation of human intelligence into fuzzy systems. Its learning rule is based on the error propagation algorithm to minimize the average squares of error between the network output and the actual output. The operation of the ANFIS model was briefly presented by Jang (1993).

Support vector machine (SVM)
The support vector machine was first introduced to the scientific community by Vapnik et al. (1995). SVM can be used in classifier and regressor problems. A regressionbased SVM is usually called an SVR and the main aim of an SVM is to minimize the structural risk for solving complex problems (Samadianfard et al., 2019;Sun et al., 2021). One of the advantages of this algorithm is that it does not fall into the trap of local optimizations owing to the use of global optimization methods in its structure. Also, the support vector machine algorithm uses a nonlinear function to map the input vector to a higher dimensional space. It then estimates the value of the outputs using linear regression. It is assumed that (x, y) is the data of the observation phase, where x is the input vector and y is the output of the observations. Using Equation (1), this algorithm establishes a linear relationship between inputs and outputs: where y is the output of the model, f (x) indicates the linear relationship between inputs and outputs and φ(x) is the function of nonlinear mapping. ω and b represent weight and bias in the model. The goal is to reduce the difference between the model outputs and the actual outputs. For this purpose, the objective function of Equation (2) is minimized using the second-order optimization method: In the first part of this equation, ||ω|| 2 /2 represents weights. The second part γ is a positive real number and represents the penalty factor, ξ i and ξ * i are penalty coefficients around the top and bottom of the error. The parameter ε represents the accuracy of the model. In this regard, the first part indicates the simplicity of the model and the second term indicates the experimental error of the model. In this study, the radial kernel function was used (Equation 3): where σ represents the width of the kernel function and K is the nonlinear function of the kernel (Smola & Schölkopf, 2004).

M5 model tree
The M5 model tree was first proposed by Quinlan (1992) to solve regression problems. This algorithm consists of a number of branches and leaves that have a linear regression relationship at the end of each leaf. The algorithm consists of two stages of growth and pruning. In the growth phase, the input data is divided into several subsets, and a regression relationship is formed for each subset. The criterion for this division is the standard deviation and error reduction (Kisi, 2015). This criterion is defined in relation (4): In this equation, SDR represents the reduction of the standard deviation, sd the value of the standard deviation, T the parent node data, and T i the node data of the child. Next, the child node that has the highest reduction in standard deviation relative to the parent node is selected. After the end of this stage, the tree model has a large size, which makes pre-fit. Therefore, the pruning stage is performed and the extra branches of the tree are removed until the error of the model does not increase (Mansouri et al., 2016).

Least-squares support vector machine (LSSVM)
The LSSVM was provided by Suykens (2001). This algorithm has less complexity than the standard support vector machine owing to its use of the least-squares optimization method instead of the second-order method (Suykens, 2001). This method converts the nonlinear relationship of inputs and outputs into a linear relationship by mapping inputs from a lower dimension to a higher dimension. This is useful in the miniaturization and solving of nonlinear problems (Anandhi et al., 2008). Equation (5) describes the linear regression relationship between inputs and outputs in the least-squares support vector machine algorithm: where W is the weight of the inputs, b is the bias, Φ is a nonlinear function for mapping inputs from the main space to a higher dimension space, x is the input of the model and y is the output value of the model. The goal is to reduce errors between inputs and outputs while maintaining model simplicity. To this end, the objective function of Equation (6) must be minimized (Anandhi et al., 2008): where C is the penalty factor and a positive real number. The first part of Equation (6) indicates the weights, and the lower they are, the less complex the model will be. The second statement of Equation (6) is related to the penalty function of the difference between the actual output values and the model. Regarding the parameter C, it can be said that small or large values of this parameter in the statement of Equation (6) cause the simplicity or complexity of the model (Modaresi et al., 2018).

Bat optimization algorithm
The bat algorithm operates based on a sound echo and the bat's position. The bat produces sound pulses and receives their echoes. Bats have the ability to detect prey based on echoes. Because the sound echo produced for different objects is different, the bat's ears use this method to detect the position. The bat algorithm performs with the following assumptions (Allawi et al., 2018a(Allawi et al., , 2018bEhteram et al., 2017): (1) All bats can produce sound and receive its echo. Based on this ability, they can distinguish between a food source and a barrier. It can be assumed that the value of the frequency f can vary between the two values f min and f max and the corresponding wavelength between λ min and λ max . The wavelength range can also vary. The wavelength should be selected based on the search space of the problem. X best is considered in the bat algorithm as the universal answer to the problem or the best position of bats. Equations (7) to (9) show the frequency, speed and updated position of the bats, respectively: In the above equations: f i is the frequency of bat i, v i t is the new speed of bat i, v i t−1 is the previous speed of bat i, x i t is the new position of bat i, x i t−1 is the previous position of the bat i, β is a random vector with arrays between 0 and 1. In the first step, a random number between 0 and 1 is assigned to each bat. Then the bat's speed and position are updated based on Equations (8) and (9). Then a random number is generated. If the pulse output rate is less than this random number, local search is performed using a random step based on the relation (10): In this equation, ε is a random number and A t is the average loud sound. The flowchart of the LSSVM-BA algorithm has been shown in Figure 1 adapted from (Bo et al., 2020).

Least-squares support vector machine-bat algorithm (LSSVM-BA)
The LSSVM approach relies on its parameters and the kernel function. Parameter optimization is an indispensable part of any LSSVM model. The BA, regarded as a population intelligent optimization algorithm, offers a novel idea for searching for optimal parameters (Wu & Lin, 2019;Wu & Peng, 2016). In the present study, a hybrid combination of the least-squares support vector machine and the bat optimization algorithm (LSSVM-BA) was used to predict labyrinth overflow discharge. The different steps of this algorithm are as follows (Wu & Lin, 2019;Wu & Peng, 2016).
(1) Determining the initial parameters of the bat algorithm including population number, maximum and minimum frequency, maximum and maximum sound height and maximum number of iterations.
(2) Dividing of laboratory data into two sets: training and testing. The results of the study of Bo et al. (2020) show that the LSSVM_BA model has better prediction accuracy and effects compared with multiple linear regression models.

Laboratory data used
To run our soft computing models discussed in this paper, we use the empirical results obtained from the laboratory of Crookston and Tullis (2012) to predict the discharge coefficient of curved labyrinth overflows. They examined the effect of changes in the angle of the arc cycle as well as the lateral wall on the discharge coefficient of curved labyrinth weirs in a channel with dimensions 1.5 × 7.7 × 6.3 m. Figure 2 presents the plan of a curved labyrinth weir along with its geometric parameters adapted from (Crookston & Tullis, 2012). The experimental models studied by Crookston and Tullis used in this study include labyrinth overflows with: a lateral wall angle of 6°and a bending angle of 10°; a lateral wall angle of 6°and a bending angle of 20°; a lateral wall angle of 6°and a bending angle of 30°; a lateral wall angle of 12°and a bending angle of 10°; a lateral wall angle of 12°and a bending angle of 20°; and a lateral wall angle of 12°and a bending angle of 30°. In the this study, we use the ratio of total upstream head to overflow height (H t /P), side wall angle (α) and curvature angle (θ) as input data, while the discharge coefficient (C d ) is the target output that we try to predict using a suite of intelligent algorithms. The discharge coefficient of labyrinth weirs is calculated using the general equation of wide-edge overflows using Equation (11): where Q is the flow rate of the overflow, L is the length of the overflow, H t is the total upstream head on the overflow and C d is the discharge coefficient. The number of data obtained from the experiment to predict the discharge coefficient of curved labyrinth weirs is 355. The range of parameters used in the intelligent models is shown in Table 1.

Statistical indicators
We used a number of statistical indicators to evaluate and compare the performance of the different models. These indicators are the correlation coefficient (R), the mean absolute square (MAE) and the root mean square  (12), (13) and (14), respectively. The R index indicates the degree of correlation between laboratory values and smart model outputs, and the closer it is to one, the better the match between the laboratory data and the smart model results.
The MAE and RMSE indicators also indicate the error rate of the experiment, and thus the closer they are to zero, the more accurate the prediction of the intelligent model.
In the above equations, E i is the value obtained from the laboratory model, G i is the value predicted by the intelligent model and N is the number of variables.

Results and discussion
Across all our experiments, and following the recommendations and conclusions given by Karami et al. (2018), we used 70% of the dataset for training and the remaining 30% for testing. Figure 3 depicts the performance of the ANFIS, SVM, M5, LSSVM and LSSVM-BA models using different indicators in the training and testing phases.
Each of these selected algorithms has its own advantages. For example, the main practical advantage of the ANFIS model over physical models is that predictions can be measured in an easy, fast and accurate way, which is crucial for practical purposes. The number of experiments, and therefore the costs, can be reduced in this way (Vural et al., 2009). The great merit of the SVM approach is the formulation of its learning problem, leading to the quadratic optimization task. It considerably reduces the number of operations in the learning mode. This is seen very well for large data sets, where the SVM algorithm is usually much quicker (Osowski et al., 2004).
The advantage of using the M5 model tree is the availability of simple linear models to estimate the discharge, as well the use of less computational time (Sattari et al., 2013).
The LSSVM model has some advantages. For example, LSSVM uses only one hidden layer, this benefit leads to more simplicity in the structure. Moreover, LSSVM uses the global optimization algorithm (least-squares optimization) instead of gradient descent, and therefore does not become trapped in local optima.
The advantage of the bat optimization algorithm is the powerful combination between a population-based algorithm and local search; however, the advantage is more noticeable in local search (Heraguemi et al., 2015) Through the training phase, the highest correlation coefficient is for the LSSVM-BA model with a value of 0.9995, and the lowest correlation coefficient is for the ANFIS model with a value of 0.9477. Based on the MAE indicator, the LSSVM-BA algorithm has the lowest value (0.0027) while the ANFIS algorithm has the highest (0.0288). The RMSE criterion shows that the LSSVM-BA algorithm has the lowest value (0.0038) and the ANFIS algorithm has the highest value (0.0368).
Through the testing phase, the highest value of the R 2 index is attributed to the LSSVM-BA model with 0.9990, and the lowest value is for the ANFIS model with 0.9234. The highest value of the MAE index is for the ANFIS model with 0.0309, while the lowest value is for the LSSVM-BA model with 0.0035. The highest value of the RMSE index belongs to the ANFIS model, with a value of 0.0427, and the lowest value belongs to LSSVM-BA with 0.0050. Figure 4 compares the discharge coefficient of curved labyrinth weirs in two laboratory settings with predictions generated from the ANFIS, SVM, M5, LSSVM and LSSVM-BA models in the training phase. The obtained data reveal that the LSSVM-BA model has the highest  correlation and density among the studied models with a correlation coefficient of 0.9995.
Based on their performance, the remaining models are ranked as follows: M5, LSSVM, SVM and ANFIS, with values of 0.9969, 0.9948, 0.9495 and 0.9477 for the correlation coefficient, respectively. The good performance of LSSVM-BA might be justified by the automatic search mechanism with which the LSSVM model is augmented, which led to better learning and generalization ability and consequently an easily acquired global optimal solution (Wu & Lin, 2019). Figure 5 examines the correlation between laboratory data and the results of the ANFIS, SVM, M5, LSSVM and LSSVM-BA intelligent models in the test phase. Again, the LSSVM-BA model with a correlation coefficient of 0.9990 outperforms the rest of the models: the LSSVM model has a correlation coefficient of 0.9923, the M5 model has a correlation coefficient of 0.9911, the SVM model has a correlation coefficient of 0.9867 and the ANFIS model has a coefficient correlation of 0.9234. The good performance of the hybrid LSSVM-BA algorithm was also examined in the study of Wu and Peng (2016). Figure 6 shows the distribution of the prediction error of the discharge coefficient in the training phase for the ANFIS, SVM, M5, LSSVM and LSSVM-BA models. As can be seen, the error of the ANFIS model is between −10% and 13%, the error of the SVM model is between −10% and 16%, the error of the M5 model is between −3% and 5%, the error is of the LSSVM model is between −5% and 4% and the LSSVM-BA error is between −2% and 2%. The good results of LSSVM-BA are attributable to the BA algorithm's better convergence rate and to the better prediction accuracy of LSSVM kernel parameters, which are optimized by the BA algorithm (Wu & Lin, 2019). In this set of results, the performance of the ANFIS model is not satifactory because it uses gradient-based learning techniques such as back-propagation, which need a considerable amount of computation to optimize and train (Shihabudheen & Pillai, 2018). Figure 7 shows the distribution of the prediction error of the discharge coefficient in the testing phase for the ANFIS, SVM, M5, LSSVM and LSSVM-BA models. In this diagram, the error parameter represents the discrepancy between the laboratory data and the data predicted by the intelligent models. As can be seen in this testing phase, the error of the ANFIS model is between −11% and 15%, the error of the SVM model is between −10% and 15%, the error of the M5 model tree is between −4% and 6%, the error of the LSSVM model is between −5% and 5% and the LSSVM-BA error is between −2% and 2%. Figure 8 shows the distribution of the predicted error on the threshold of different errors in the training phase for the ANFIS, SVM, M5, LSSVM and LSSVM-BA models. As seen, more than 70, 82, 95, 96 and 100% of the predicted data in the ANFIS, SVM, LSSVM, M5 and LSSVM-BA models, respectively, have less than 2% relative error. The diagram also indicates that approximately 100% of the data have less than 2% error in LSSVM-BA, less than 4% error in the LSSVM model, less than 5% error in the M5 model tree, less than 13% error in the ANFIS model and less than 17% error in the SVM model. Figure 9 shows the distribution of the predicted error on the threshold of different errors in the testing phase for the ANFIS, SVM, M5, LSSVM and LSSVM-BA models. The diagram shows that more than 71, 80, 88, 92 and 100% of the predicted data in the ANFIS, SVM, M5, LSSVM and LSSVM-BA models, respectively, have less than 2% relative error. In general, almost all data in the ANFIS, SVM, M5, LSSVM and LSSVM-BA models are estimated to have an error of less than 16, 15, 6, 5 and 2%, respectively. Figure 10 shows a Taylor diagram (Taylor, 2001) that illustrates the simulation results of the ANFIS, SVM, M5, LSSVM and LSSVM-BA models in the testing phase. This graph was plotted to analyze the values of standard deviation, correlation coefficient and root mean square error between the observed data and simulated data generated by the intelligent models. It should be noted that, in the Taylor diagram, the longitudinal distance from the origin of the coordinates represents the standard deviation, the radial lines represent the correlation coefficient and the segmental lines represent the root mean square error values. By increasing the circle segment, the mentioned parameter value is increased. In other words, each point on Taylor's graph represents simultaneously the  three parameters standard deviation, correlation coefficient and root mean square error. From this diagram, it can be concluded that the accuracies of the LSSVM-BA, LSSVM and M5 models are very close to each other, and the LSSVM-BA model has the best result while the ANFIS model has the lowest accuracy.
Based on the obtained prediction accuracy during the training phase, we can rank the models (best to worst) as follows: LSSVM-BA, M5, LSSVM, SVM and ANFIS. In the testing phase, they are ranked (best to worst): LSSVM-BA, LSSVM, M5, SVM and ANFIS. Table 2 shows the number of input and output data in the test phase for laboratory data and the values predicted by the LSSVM-BA model. According to this table, the observed discharge coefficient and the discharge coefficient predicted by the LSSVM-BA model have a high correlation.

Conclusions
Overflows are one of the methods of flood control in dams, and diversion and flow measurement in canals. The discharge capacity is one of the significant hydraulic parameters in the context of overflows. In this study, the ANFIS, SVM, M5, LSSVM and LSSVM-BA intelligent models have been used to estimate the discharge coefficients of curved labyrinth overflows. To achieve this goal, out of a total of 355 data extracted from laboratory results, 248 data were used in the training and 107 data were used in the testing. The results of the evaluation indicators showed that, in both the training and testing courses, the LSSVM-BA model has the best performance among the models examined in estimating the discharge coefficient of curved labyrinth overflows. Also, the correlation values for the LSSVM-BA model in the training and testing phases were 0.9995 and 0.9990, for the M5 model tree in the training and testing phases were 0.9969 and 0.9911, for the SVM model in the training and testing phases were 0.9495 and 0.9867, and for the ANFIS model in the training and testing phases were 0.9477 and 0.9234, respectively. This confirms the superiority of the LSSVM-BA model. It is important to note that, in order to predict more accurately the discharge coefficients of curved labyrinth overflows, they can be modeled in the laboratory and related tests on them conducted, but doing so requires cost and time, which has many limitations. But the use of powerful new algorithms such as LSSVM-BA, as well delivering acceptable results, also saves time and money. It is suggested that the LSSVM-BA algorithm can be considered for predicting the discharge coefficients of new overflows such as curved piano-key overflows, and the accuracy of this algorithm in this field should be examined.