# Predicting Discharge Coefficient of Triangular Side Orifice Using LSSVM Optimized by Gravity Search Algorithm

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

^{2}) and Nash–Sutcliffe efficiency (NSE), equal to 0.965 and 0.993, and the least root mean square error (RMSE) and mean absolute error (MAE), equal to 0.0099 and 0.0077, respectively. The LSSVM-GSA improved the RMSE of the SVM and LSSVM by 26% and 20% in estimating the discharge coefficient. Furthermore, the ratio of orifice crest height to orifice height (W/H) was identified as having the highest influence on the discharge coefficient of triangular side orifices among the various input variables.

## 1. Introduction

_{d}of a side weir in a circular channel under a supercritical flow regime. Both of the algorithms outperformed the empirical equations of Biggiero et al. and Hager. Li et al. [29] provided the machine learning models ANN, SVM and extreme learning machine (ELM) for the prediction of the discharges of rectangular sharp-crested weirs. They found that all three models were capable of predicting the C

_{d}with high accuracy, but the SVM exhibited somewhat better performance.

_{d}of trapezoidal and rectangular sharp-crested side weirs. The results showed that the SVM–GA model gave more accurate outputs than the GEP.

## 2. Materials and Methods

#### 2.1. Discharge Equation of Triangular Side Orifice

_{1}and h

_{2}represent elevation of water from the free surface to the orifice crest at the upstream and downstream ends of the orifice. In addition, the flow depths at upstream and downstream ends of the orifice are shown by y

_{1}and y

_{2}[2].

_{c}is the flow height above the centroid of orifice section that is calculated from:

_{c}denotes flow depth from the surface of the water to the bed channel at above side orifice (see Figure 1).

#### 2.2. Analyzing Discharge Coefficient of a Triangular Side Orifice

_{d}). These parameters include height (H) and length (L) of the orifice, crest height of the orifice (W), upstream flow depth in the main channel (y

_{1}), upstream velocity in the main channel (V

_{1}), width of the main channel (B), water density (ρ), water viscosity (μ), acceleration due to gravity (g) and water surface tension (σ). Hence, the following function can be used for expressing the discharge coefficient of triangular side orifices:

_{1}represents the Froude number.

#### 2.3. Experimental Data

#### 2.4. Support Vector Machine (SVM)

_{i}represents the measured value by the model, C

_{c}denotes the capacity parameter and ${\xi}_{i}$ and ${\xi}_{i}^{\ast}$ represent the Slack variables. The kernel functions are used in SVM model for solving nonlinear problems. There are different kernel functions in SVM model, including sigmoid kernel, Gaussian radial base kernel function (RBF) and polynomial kernel [44]. The equations of common kernel functions [51] have been given in Table 2. In the present research, among various kernel functions, the radial basis function (RBF) was utilized to model the C

_{d}of Δ-shaped side orifices, because the superiority of this kernel over the other two alternatives is proved by the existing literature.

#### 2.5. Least Squares Support Vector Machines (LSSVM)

_{i}refer to the regularization parameter and error in the training phase. For solving this optimization problem, the Lagrange function is employed for finding the w and e solutions. The Lagrange function is presented below:

_{i}denotes a Lagrange multiplier. Equation (8) can be solved through calculation of the partial differential of the Lagrange function and application of the kernel function (KF) for satisfying the Mercer’s condition. Equation (11) is solved by partial differential with regard to b, w, e

_{i}and a

_{i}:

_{i}and w, it is possible to write the following set of linear equations as below [55]:

_{1}, …, α

_{n}] and y = [y

_{1}, …, y

_{n}]. Hence, LSSVM model for estimation of function is given as follows:

#### 2.6. The Gravitational Search Algorithm (GSA)

_{i}(t) and fit

_{i}(t) are the mass and the fitness value of the ith agent at time t. The best(t) and worst(t) in a minimization problem are expressed as below:

_{ij}(t) represents the Euclidian distance between the two agents i and j, G(t) denotes the gravitational constant at the time t, ε indicates a small constant and randj denotes a random number between [0, 1].

_{i}(t + 1) and v

_{i}(t + 1) denote the next position and next velocity of the agent and rand

_{i}represents a uniform random variable in the [0, 1] interval.

#### 2.7. Least Squares Support Vector Machine-Gravitational Search Algorithm (LSSVM–GSA)

_{d}prediction model using the combination of GSA and LSSVM approaches (LSSVM–GSA), which is also observed in Figure 4.

- (i)
- First, all discharge coefficient data sets are divided into parts of training and testing.
- (ii)
- Then, the proper kernel function and primary parameters for LSSVM–GSA model are selected for making the initial LSSVM model.
- (iii)
- The particle fitness value is calculated for each agent. In the present work, we selected RMSE as the fitness function.
- (iv)
- The best-fitted parameter combinations are selected via GSA for obtaining the optimum values for LSSVM parameters.
- (v)
- In the case that the stopping criterion is not met, the new hybrid of parameters is used for reconstructing the LSSVM. The fitness is computed as long as it fits the stopping criterion.
- (vi)
- The values of ideal parameters are obtained for building the optimum LSSVM model to forecast discharge coefficient. The testing values are now utilized for the optimum LSSVM for achievement of C
_{d}prediction results.

## 3. Performance Evaluation Indicators

^{2}), Nash–Sutcliffe efficiency (NSE) and mean absolute error (MAE) were utilized as assessment criteria. The computational relations and the range of these performance metrics have been presented as follows [58]:

_{i}and O

_{i}are the predicted and observed ith value, respectively. In addition, $\overline{{P}_{i}}$ and $\overline{{O}_{i}}$ are the average of predicted and observed values, respectively.

## 4. Application of the Models

_{d}). Considering the highest correlation (−0.770) between B/H and C

_{d}, this parameter was selected as the first input combination. To compose the other combinations, other parameters were involved in the combination one by one at each step. The fifth combination includes all input parameters.

_{d}; therefore, they were used as input variables in the first and second scenarios. The remaining variables were also ranked based on the correlation coefficients and were applied in the subsequent input scenarios.

^{−5}–10

^{5}, 10

^{−2}–10

^{2}and 10

^{−3}–10

^{3}, 10

^{−5}–10

^{5}were applied following previous literature [59,60,61]. In addition, GSA was employed to get optimized hyper-parameters for the LSSVM. To optimize LSSVM hyper-parameters, control parameter values of the GSA algorithm have a key role, i.e., gravitational constant (G

_{0}) and constant alpha (α). Therefore, parameters of LSSVM are found optimal with the G

_{0}parameter in range of 108–114 and α parameter in range of 18–20.

## 5. Results and Discussion

_{4}), the accuracy of the models’ results is significantly improved; RMSE decreases from 0.0272 to 0.0156 for SVM, from 0.0227 to 0.0129 for LSSVM and from 0.0217 to 0.0108 for LSSVM-GSA. Additionally, all three methods had the best performance for the M

_{5}input scenario including all five variables (B/H, B/L, Fr

_{1}, W/H, H/y

_{1}).

^{2}, RMSE, MAE and NSE values for the optimal pattern (M

_{5}) were obtained as 0.938, 0.0134, 0.0101 and 0.9849 for the SVM model, 0.958, 0.0125, 0.0099 and 0.9895 for the LSSVM model, and 0.965, 0.0099, 0.0077 and 0.9934 for the LSSVM-GSA model, respectively.

_{5}pattern with the highest R

^{2}and NSE values and the lowest values of error has the highest power of predicting the Cd of Δ-shaped side orifices. After that, the SVM and LSSVM models rank second and third, respectively. The superiority of the LSSVM–GSA over the SVM and LSSVM has also been seen in the research performed by Yuan et al. [44] and Lu et al. [45].

_{d}values were in the range of 0.3246–0.5843, while the estimated C

_{d}range for the best responses was 0.3412–0.5872 for the superior model (i.e., LSSVM–GSA).

_{d}values versus experimental No. It is apparent from the detailed parts of the figure (see the two detailed graphs in the lower part of the figure) that the LSSVM–GSA is more successful in catching C

_{d}of Δ-shaped side orifices than the SVM and LSSVM models.

_{d}values over the test period for the best input combination (M

_{5}) has been depicted in Figure 6. For all the models, very good dispersion is seen around the 45° axis, indicating high capability of the models used in the current work. For 170 discharge data during the test stage for SVM, LSSVM and LSSVM–GSA, 95%, 96% and 97% of the points were situated within the 5% confidence band.

_{d}values. In addition, the SVM and LSSVM models have some fluctuations in estimating the observed values in the mentioned range. For the upper quartile, the SVM and LSSVM−GSA models have similar accuracy in terms of statistical distribution and matching with the observed values. Additionally, the LSSVM model is found to overestimate the higher C

_{d}values.

_{d}for the test period and best input combination. As observed in Figure 8, the representative markers of LSSVM and LSSVM−GSA have similar positions; however, the LSSVM−GSA model shows better accuracy than the two other models in terms of RMSE, r and SD indices.

_{5}). For the best input scenario, the run times of the SVM, LSSVM and LSSVM−GSA models were 1.534 s, 0.027 s and 26.2 s, respectively. Although the computational cost of the LSSVM-GSA model was higher than the other two models, the aforementioned model had the best prediction accuracy, and moreover, the time required to implement the model is acceptable from an engineering point of view. Similarly, in the research performed by Lu et al. [45], the LSSVM−GSA model was selected as the superior model, with the highest performance and computational time among the implemented models.

## 6. Conclusions

_{d}). According to the statistical indices, the models generally provided satisfactory performance in estimating C

_{d}for all input combinations, and the models had similar sensitivity to the scenario changes and addition of the hydraulic and geometric variables to the input combinations. However, in all of the models, adding the ratio of orifice crest height to orifice height (W/H) into the model input (M

_{4}) produced the best accuracy and improvement in RMSE by 42.6%, 43.2% and 50.2% for the SVM, LSSVM and LSSVM−GSA models, respectively. The outcomes also indicated that the LSSVM−GSA improved prediction accuracy over SVM and LSSVM. It was found that optimization of the LSSVM model using the gravity search algorithm (GSA) improved the RMSE by 26% and 20%, respectively, for the best input combination (M

_{5}) compared to the SVM and LSSVM models. In addition, based on the visualization inspection (i.e., scatter plots, boxplots and Taylor diagram), the highest correlation and the best statistical distribution of model values belonged to the LSSVM−GSA, although the low discharge coefficients tended to be slightly overestimated when compared to the respective measured values. The overall results of the present study propose the LSSVM optimized with GSA model as a new and efficient model to estimate the discharge coefficient and other hydraulic parameters in open channels.

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## List of Symbols

B | The main channel width (cm) |

L | Length of the orifice |

C_{d} | Discharge coefficient |

Fr_{1} | Upstream Froude number |

g | Gravitational acceleration |

H | Height of the triangular side orifice |

Q_{s} | Discharge through the orifice |

Q_{u} | Discharge through the main channel |

V_{1} | Upstream velocity |

W | Orifice crest height |

y_{1} | Upstream flow depth |

µ | Water viscosity |

ρ | The water density |

σ | water surface tension |

h_{c} | flow height above centroid of orifice section |

y_{c} | flow depth from the surface of the water to the bed channel at above side orifice |

y_{i} | measured value by the model |

C_{c} | capacity parameter |

${\xi}_{i},{\xi}_{i}^{\ast}$ | Slack variables |

γ | regularization parameter |

e_{i} | error in the train phase |

M_{i}(t) | mass value of the ith agent |

fit_{i}(t) | fitness value of the ith agent |

R_{ij}(t) | Euclidian distance between the two agents i and j |

G(t) | gravitational constant |

ε | small constant |

## References

- Hussain, A.; Ahmad, Z.; Asawa, G. Flow through sharp-crested rectangular side orifices under free flow condition in open channels. Agric. Water Manag.
**2011**, 98, 1536–1544. [Google Scholar] [CrossRef] - Vatankhah, A.R.; Mirnia, S.H. Predicting Discharge Coefficient of Triangular Side Orifice under Free Flow Conditions. J. Irrig. Drain. Eng.
**2018**, 144, 04018030. [Google Scholar] [CrossRef] - Ramamurthy, A.S.; Tim, U.S.; Rao, M.V.J. Weir-Orifice Units for Uniform Flow Distribution. J. Environ. Eng.
**1987**, 113, 155–166. [Google Scholar] [CrossRef] - Ramamurthy, A.S.; Tim, U.S.; Sarraf, S. Rectangular Lateral Orifices in Open Channels. J. Environ. Eng.
**1986**, 112, 292–300. [Google Scholar] [CrossRef] - Gill, M.A. Flow through Side Slots. J. Environ. Eng.
**1987**, 113, 1047–1057. [Google Scholar] [CrossRef] - Hussain, A.; Ahmad, Z.; Ojha, C. Analysis of flow through lateral rectangular orifices in open channels. Flow Meas. Instrum.
**2014**, 36, 32–35. [Google Scholar] [CrossRef] - Hussain, A.; Ahmad, Z.; Asawa, G. Discharge characteristics of sharp-crested circular side orifices in open channels. Flow Meas. Instrum.
**2010**, 21, 418–424. [Google Scholar] [CrossRef] - Hussain, A.; Ahmad, Z.; Ojha, C. Flow through lateral circular orifice under free and submerged flow conditions. Flow Meas. Instrum.
**2016**, 52, 57–66. [Google Scholar] [CrossRef] - Bryant, D.B.; Khan, A.A.; Aziz, N.M. Investigation of Flow Upstream of Orifices. J. Hydraul. Eng.
**2008**, 134, 98–104. [Google Scholar] [CrossRef] - Guo, J.C.Y.; Stitt, R.P. Flow through Partially Submerged Orifice. J. Irrig. Drain. Eng.
**2017**, 143, 06017006. [Google Scholar] [CrossRef] - Cheong, H. Discharge Coefficient of Lateral Diversion from Trapezoidal Channel. J. Irrig. Drain. Eng.
**1991**, 117, 461–475. [Google Scholar] [CrossRef] - Singh, R.; Manivannan, D.; Satyanarayana, T. Discharge coefficient of rectangular side weirs. J. Irrig. Drain. Eng.
**1994**, 120, 814–819. [Google Scholar] [CrossRef] - Swamee, P.K.; Pathak, S.K.; Ali, M.S. Side-Weir Analysis Using Elementary Discharge Coefficient. J. Irrig. Drain. Eng.
**1994**, 120, 742–755. [Google Scholar] [CrossRef] - Borghei, S.M.; Jalili, M.R.; Ghodsian, M. Discharge Coefficient for Sharp-Crested Side Weir in Subcritical Flow. J. Hydraul. Eng.
**1999**, 125, 1051–1056. [Google Scholar] [CrossRef] - Emiroglu, M.E.; Kaya, N.; Agaccioglu, H. Discharge Capacity of Labyrinth Side Weir Located on a Straight Channel. J. Irrig. Drain. Eng.
**2010**, 136, 37–46. [Google Scholar] [CrossRef] - Borghei, S.M.; Parvaneh, A. Discharge characteristics of a modified oblique side weir in subcritical flow. Flow Meas. Instrum.
**2011**, 22, 370–376. [Google Scholar] [CrossRef] - Borghei, S.M.; Nekooie, M.A.; Sadeghian, H.; Ghazizadeh, M.R.J. Triangular labyrinth side weirs with one and two cycles. Water Manag.
**2013**, 166, 27–42. [Google Scholar] [CrossRef] - Bilhan, O.; Emiroglu, M.E.; Kisi, O. Application of two different neural network techniques to lateral outflow over rectangular side weirs located on a straight channel. Adv. Eng. Softw.
**2010**, 41, 831–837. [Google Scholar] [CrossRef] - Emiroglu, M.E.; Kisi, O. Prediction of discharge coefficient for trapezoidal laby-rinth side weir using a neuro-fuzzy approach. Water Resour. Manag.
**2013**, 27, 1473–1488. [Google Scholar] [CrossRef] - Khoshbin, F.; Bonakdari, H.; Talesh, S.H.A.; Ebtehaj, I.; Zaji, A.H.; Azimi, H. Adaptive neuro-fuzzy inference system multi-objective optimization using the genetic algorithm/singular value decomposition method for modelling the discharge coefficient in rectangular sharp-crested side weirs. Eng. Optim.
**2015**, 48, 933–948. [Google Scholar] [CrossRef] - Ebtehaj, I.; Bonakdari, H.; Zaji, A.H.; Azimi, H.; Khoshbin, F. GMDH-type neural network approach for modeling the discharge coefficient of rectangular sharp-crested side weirs. Eng. Sci. Technol. Int. J.
**2015**, 18, 746–757. [Google Scholar] [CrossRef][Green Version] - Ebtehaj, I.; Bonakdari, H.; Zaji, A.H.; Azimi, H.; Sharifi, A. Gene expression programming to predict the discharge coefficient in rectangular side weirs. Appl. Soft Comput.
**2015**, 35, 618–628. [Google Scholar] [CrossRef] - Parsaie, A. Predictive modeling the side weir discharge coefficient using neural network. Model. Earth Syst. Environ.
**2016**, 2, 1–11. [Google Scholar] [CrossRef][Green Version] - Azamathulla, H.M.; Haghiabi, A.H.; Parsaie, A. Prediction of side weir discharge coefficient by support vector machine technique. Water Supply
**2016**, 16, 1002–1016. [Google Scholar] [CrossRef][Green Version] - Azimi, H.; Bonakdari, H.; Ebtehaj, I. A Highly Efficient Gene Expression Programming Model for Predicting the Discharge Coefficient in a Side Weir along a Trapezoidal Canal. Irrig. Drain.
**2017**, 66, 655–666. [Google Scholar] [CrossRef] - Azimi, H.; Bonakdari, H.; Ebtehaj, I. Sensitivity analysis of the factors affecting the discharge capacity of side weirs in trapezoidal channels using extreme learning machines. Flow Meas. Instrum.
**2017**, 54, 216–223. [Google Scholar] [CrossRef] - Azimi, H.; Bonakdari, H.; Ebtehaj, I. Design of radial basis function-based support vector regression in predicting the discharge coefficient of a side weir in a trapezoidal channel. Appl. Water Sci.
**2019**, 9, 78. [Google Scholar] [CrossRef][Green Version] - Granata, F.; Di Nunno, F.; Gargano, R.; de Marinis, G. Equivalent Discharge Coefficient of Side Weirs in Circular Channel—A Lazy Machine Learning Approach. Water
**2019**, 11, 2406. [Google Scholar] [CrossRef][Green Version] - Li, S.; Yang, J.; Ansell, A. Discharge prediction for rectangular sharp-crested weirs by machine learning techniques. Flow Meas. Instrum.
**2021**, 79, 101931. [Google Scholar] [CrossRef] - Emiroglu, M.E.; Kisi, O.; Bilhan, O. Predicting discharge capacity of triangular labyrinth side weir located on a straight channel by using an adaptive neuro-fuzzy technique. Adv. Eng. Softw.
**2010**, 41, 154–160. [Google Scholar] [CrossRef] - Emiroglu, M.E.; Bilhan, O.; Kisi, O. Neural networks for estimation for dis-charge capacity of triangular labyrinth side-weir located on a straight channel. Expert Syst. Appl.
**2011**, 38, 867–874. [Google Scholar] [CrossRef] - Bilhan, O.; Emiroglu, M.E.; Kisi, O. Use of artificial neural networks for prediction of discharge coefficient of triangular labyrinth side weir in curved channels. Adv. Eng. Softw.
**2011**, 42, 208–214. [Google Scholar] [CrossRef] - Kisi, O.; Emiroglu, M.E.; Bilhan, O.; Guven, A. Prediction of lateral outflow over triangular labyrinth side weirs under subcritical conditions using soft computing approaches. Expert Syst. Appl.
**2012**, 39, 3454–3460. [Google Scholar] [CrossRef] - Zaji, A.H.; Bonakdari, H. Performance evaluation of two different neural network and particle swarm optimization methods for prediction of discharge capacity of modified triangular side weirs. Flow Meas. Instrum.
**2014**, 40, 149–156. [Google Scholar] [CrossRef] - Bonakdari, H.; Zaji, A.H.; Shamshirband, S.; Hashim, R.; Petkovic, D. Sensitivity analysis of the discharge coefficient of a modified triangular side weir by adaptive neuro-fuzzy methodology. Measurement
**2015**, 73, 74–81. [Google Scholar] [CrossRef] - Parvaneh, A.; Kabiri-Samani, A.; Nekooie, M.A. Discharge Coefficient of Triangular and Asymmetric Labyrinth Side Weirs Using the Nonlinear PLS Method. J. Irrig. Drain. Eng.
**2016**, 142, 06016010. [Google Scholar] [CrossRef] - Parsaie, A.; Haghiabi, A.H. Improving Modelling of Discharge Coefficient of Triangular Labyrinth Lateral Weirs Using SVM, GMDH and MARS Techniques. Irrig. Drain.
**2017**, 58, 246–654. [Google Scholar] [CrossRef] - Dutta, D.; Mandal, A.; Afzal, M.S. Discharge performance of plan view of multi-cycle W-form and circular arc labyrinth weir using machine learning. Flow Meas. Instrum.
**2020**, 73, 101740. [Google Scholar] [CrossRef] - Eghbalzadeh, A.; Javan, M.; Hayati, M.; Amini, A. Discharge prediction of circular and rectangular side orifices using artificial neural networks. KSCE J. Civ. Eng.
**2015**, 20, 990–996. [Google Scholar] [CrossRef] - Ebtehaj, I.; Bonakdari, H.; Khoshbin, F.; Azimi, H. Pareto genetic design of group method of data handling type neural network for prediction discharge coeffi-cient in rectangular side orifices. Flow Meas. Instrum.
**2015**, 41, 67–74. [Google Scholar] [CrossRef] - Azimi, H.; Shabanlou, S.; Ebtehaj, I.; Bonakdari, H.; Kardar, S. Combination of Computational Fluid Dynamics, Adaptive Neuro-Fuzzy Inference System, and Genetic Algorithm for Predicting Discharge Coefficient of Rectangular Side Orifices. J. Irrig. Drain. Eng.
**2017**, 143, 04017015. [Google Scholar] [CrossRef] - Roushangar, K.; Khoshkanar, R.; Shiri, J. Predicting trapezoidal and rectangular side weirs discharge coefficient using machine learning methods. ISH J. Hydraul. Eng.
**2016**, 22, 254–261. [Google Scholar] [CrossRef] - Ojugo, A.A.; Emudianughe, J.; Yoro, R.E.; Okonta, E.O.; Eboka, A.O. A hybrid artificial neural network gravitational search algorithm for rainfall runoffs modeling and simulation in hydrology. Prog. Intell. Comput. Appl.
**2013**, 2, 22–33. [Google Scholar] - Yuan, X.; Chen, C.; Yuan, Y.; Huang, Y.; Tan, Q. Short-term wind power prediction based on LSSVM–GSA model. Energy Convers. Manag.
**2015**, 101, 393–401. [Google Scholar] [CrossRef] - Lu, P.; Ye, L.; Sun, B.; Zhang, C.; Zhao, Y.; Teng, J. A New Hybrid Prediction Method of Ultra-Short-Term Wind Power Forecasting Based on EEMD-PE and LSSVM Optimized by the GSA. Energies
**2018**, 11, 697. [Google Scholar] [CrossRef][Green Version] - Ghorbani, M.A.; Deo, R.S.; Karimi, V.; Kashani, M.H.; Ghorbani, S. Design and implementation of a hybrid MLP-GSA model with multilayer percep-tron-gravitational search algorithm for monthly lake water level forecasting. Stochas-tic Environmental Res. Risk Assess.
**2018**, 33, 125–147. [Google Scholar] [CrossRef] - Ahmad, A.; Razali, S.F.M.; Mohamed, Z.S.; El-Shafie, A. The Application of Artificial Bee Colony and Gravitational Search Algorithm in Reservoir Optimization. Water Resour. Manag.
**2016**, 30, 2497–2516. [Google Scholar] [CrossRef] - Adnan, R.M.; Yuan, X.; Kisi, O.; Anam, R. Imprborghoving Accuracy of River Flow Forecasting Using LSSVR with Gravitational Search Algorithm. Adv. Meteorol.
**2017**, 2017, 1–23. [Google Scholar] [CrossRef][Green Version] - Vapnik, V.N. The Nature of Statistical Learning Theory; Springer: Berlin/Heidelberg, Germany; New York, NY, USA, 1995. [Google Scholar]
- Mehdizadeh, S.; Behmanesh, J.; Khalili, K. Using MARS, SVM, GEP and empir-ical equations for estimation of monthly mean reference evapotranspiration. Comput. Electron. Agric.
**2017**, 139, 103–114. [Google Scholar] [CrossRef] - Cao, S.G.; Liu, Y.B.; Wang, Y.P. A forecasting and forewarning model for me-thane hazard in working face of coal mine based on LS-SVM. J. China Univ. Min. Technol.
**2008**, 18, 172–176. [Google Scholar] [CrossRef] - Suykens, J.; Vandewalle, J. Training multilayer perceptron classifiers based on a modified support vector method. IEEE Trans. Neural Networks
**1999**, 10, 907–911. [Google Scholar] [CrossRef] - Guo, X.; Ma, X. Mine water discharge prediction based on least squares support vector machines. Min. Sci. Technol.
**2010**, 20, 738–742. [Google Scholar] [CrossRef] - Suykens, J.; De Brabanter, J.; Lukas, L.; Vandewalle, J. Weighted least squares support vector machines: Robustness and sparse approximation. Neurocomputing
**2002**, 48, 85–105. [Google Scholar] [CrossRef] - Shabri, A. Suhartono Streamflow forecasting using least-squares support vector machines. Hydrol. Sci. J.
**2012**, 57, 1275–1293. [Google Scholar] [CrossRef][Green Version] - Rashedi, E.; Nezamabadi-Pour, H.; Saryazdi, S. GSA: A Gravitational Search Algorithm. Inf. Sci.
**2009**, 179, 2232–2248. [Google Scholar] [CrossRef] - Liu, C.; Niu, P.; Li, G.; You, X.; Ma, Y.; Zhang, W. A Hybrid Heat Rate Forecasting Model Using Optimized LSSVM Based on Improved GSA. Neural Process. Lett.
**2016**, 45, 299–318. [Google Scholar] [CrossRef] - Khosravinia, P.; Nikpour, M.R.; Kisi, O.; Yaseen, Z.M. Application of novel data mining algorithms in prediction of discharge and end depth in trapezoidal sections. Comput. Electron. Agric.
**2020**, 170, 105283. [Google Scholar] [CrossRef] - Kisi, O.; Parmar, K.S. Application of least square support vector machine and multivariate adaptive regression spline models in long term prediction of river water pollution. J. Hydrol.
**2016**, 534, 104–112. [Google Scholar] [CrossRef] - Kisi, O.; Parmar, K.S.; Soni, K.; Demir, V. Modeling of air pollutants using least square support vector regression, multivariate adaptive regression spline, and M5 model tree models. Air Qual. Atmos. Health
**2017**, 10, 873–883. [Google Scholar] [CrossRef] - Adnan, R.M.; Yuan, X.; Kisi, O.; Adnan, M.; Mehmood, A. Stream Flow Forecasting of Poorly Gauged Mountainous Watershed by Least Square Support Vector Machine, Fuzzy Genetic Algorithm and M5 Model Tree Using Climatic Data from Nearby Station. Water Resour. Manag.
**2018**, 32, 4469–4486. [Google Scholar] [CrossRef] - He, Z.; Wen, X.; Liu, H.; Du, J. A comparative study of artificial neural network, adaptive neuro fuzzy inference system and support vector machine for forecasting river flow in the semiarid mountain region. J. Hydrol.
**2014**, 509, 379–386. [Google Scholar] [CrossRef] - Shu, C.; Ouarda, T. Regional flood frequency analysis at ungauged sites using the adaptive neuro-fuzzy inference system. J. Hydrol.
**2008**, 349, 31–43. [Google Scholar] [CrossRef] - Taylor, K.E. Summarizing multiple aspects of model performance in a single diagram. J. Geophys. Res. Atmos.
**2001**, 106, 7183–7192. [Google Scholar] [CrossRef]

**Figure 1.**Water surface profile in an equilateral Δ-shaped side orifice located in a horizontal rectangular channel under subcritical regime. (

**a**) 3D view (

**b**) profile view.

**Figure 5.**Observed and predicted C

_{d}of the implemented models for the best input combination in the test period.

**Figure 6.**Observed and predicted C

_{d}for all models for the best input combination in the test period (

**a**): SVM (

**b**): LSSVM (

**c**): LSSVM−GSA.

**Figure 7.**Boxplots of observed C

_{d}compared with predicted C

_{d}from SVM, LSSVM and LSSVM−GSA models.

**Table 1.**Range of experimental data used in this research [2].

B (cm) | H (cm) | L (cm) | W (cm) | Qu (L/s) | Qs (L/s) | y_{1} (m) | y_{c} (m) | y_{2} (m) |
---|---|---|---|---|---|---|---|---|

25 | 4, 7, 10 | 30, 40 | 5, 10 | 13.33–34.64 | 1.7–17.6 | 0.0941–0.2857 | 0.1048–0.2886 | 0.1082–0.2880 |

**Table 2.**Common kernel functions [51].

Kernel Function | Function |
---|---|

$K\left(x,{x}_{i}\right)={[\left(x,{x}_{i}\right)+1]}^{q},q=1,2,\dots .$ | Polynomial |

$K\left(x,{x}_{i}\right)=tanh\left[\psi \left(x.{x}_{i}\right)+c\right]$ | Sigmoid |

$K\left(x,{x}_{i}\right)=exp(-||x-{x}_{i}|{|}^{2}/2{\sigma}^{2})$ | Radial basis function (RBF) |

M_{1} | $\frac{B}{H}$ |

M_{2} | $\frac{B}{H},\frac{B}{L}$ |

M_{3} | $\frac{B}{H},\frac{B}{L},F{r}_{1}$ |

M_{4} | $\frac{B}{H},\frac{B}{L},F{r}_{1},\frac{W}{H}$ |

M_{5} | $\frac{B}{H},\frac{B}{L},F{r}_{1},\frac{W}{H},\frac{H}{{y}_{1}}$ |

Input Combination | LSSVM | LSSVM–GSA |
---|---|---|

M_{1} | (15, 10) | (147.339958, 6.200715) |

M_{2} | (100, 7) | (1.136399, 0.001058) |

M_{3} | (14, 1) | (703.531949, 9.883098) |

M_{4} | (100, 30) | (275.137096, 0.001489) |

M_{5} | (100, 3) | (0.419690, 0.001203) |

**Table 5.**Performance metrics for estimating C

_{d}using different input combinations (Table 3) for the testing period.

Method | Input Combination | R^{2} | RMSE | MAE | NSE |
---|---|---|---|---|---|

SVM | M_{1} | 0.602 | 0.0352 | 0.0260 | 0.9214 |

M_{2} | 0.702 | 0.0297 | 0.0233 | 0.9189 | |

M_{3} | 0.757 | 0.0272 | 0.0194 | 0.9492 | |

M_{4} | 0.915 | 0.0156 | 0.0110 | 0.9651 | |

M_{5} | 0.938 | 0.0134 | 0.0101 | 0.9849 | |

LSSVM | M_{1} | 0.613 | 0.0333 | 0.0258 | 0.9216 |

M_{2} | 0.732 | 0.0278 | 0.0215 | 0. 9497 | |

M_{3} | 0.829 | 0.0227 | 0.0179 | 0.9671 | |

M_{4} | 0.954 | 0.0129 | 0.0100 | 0.9885 | |

M_{5} | 0.958 | 0.0125 | 0.0099 | 0.9895 | |

LSSVM-GSA | M_{1} | 0.613 | 0.0332 | 0.0258 | 0.9219 |

M_{2} | 0.732 | 0.0278 | 0.0215 | 0.9500 | |

M_{3} | 0.837 | 0.0217 | 0.0162 | 0.9721 | |

M_{4} | 0.960 | 0.0108 | 0.0085 | 0.9915 | |

M_{5} | 0.965 | 0.0099 | 0.0077 | 0.9934 |

Method | ANOVA | |
---|---|---|

F-Statistic | Resultant Significance Level | |

SVM | 0.138 | 0.711 |

LSSVM | 0.993 | 0.320 |

LSSVM−GSA | 0.00004 | 0.995 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Khosravinia, P.; Nikpour, M.R.; Kisi, O.; Adnan, R.M. Predicting Discharge Coefficient of Triangular Side Orifice Using LSSVM Optimized by Gravity Search Algorithm. *Water* **2023**, *15*, 1341.
https://doi.org/10.3390/w15071341

**AMA Style**

Khosravinia P, Nikpour MR, Kisi O, Adnan RM. Predicting Discharge Coefficient of Triangular Side Orifice Using LSSVM Optimized by Gravity Search Algorithm. *Water*. 2023; 15(7):1341.
https://doi.org/10.3390/w15071341

**Chicago/Turabian Style**

Khosravinia, Payam, Mohammad Reza Nikpour, Ozgur Kisi, and Rana Muhammad Adnan. 2023. "Predicting Discharge Coefficient of Triangular Side Orifice Using LSSVM Optimized by Gravity Search Algorithm" *Water* 15, no. 7: 1341.
https://doi.org/10.3390/w15071341