We noticed that you're not using the latest version of your browser. You'll still be able to use our site, but it might not work or look the way it's supposed to. We recommend upgrading your browser.
JWMM
ABOUT
PAPERS
AUTHORS
REVIEWERS
RESOURCES
Menu LOGIN
Software
Tap in to water management modeling that excels. PCSWMM is flexible, easy to use and streamlines your workflow – saving you time and resources.
Training
Beginner or seasoned user, our flexible training options help you understand and master the full capabilities of both EPA SWMM5 and PCSWMM.
Community
There's a whole community to support you - find solutions, view code and more.
OPEN SWMM
OPEN EPANET
Journal
Our peer-reviewed, open-access Journal of Water Management Modeling. Expand your knowledge, get insights and discover new approaches that let you work more effectively.
Conference
The International Conference on Water Management Modeling. Meet your colleagues, share your experiences and be on the forefront of advances in our profession.
Consulting
Not sure how to solve a complex water management issue? Put our experience, knowledge, and innovation to work for you.
  • PAPERS
  • AUTHORS
  • REVIEWERS
  • ABOUT
  • SEARCH
  • RESOURCES
    Software
    Training
    Community
    OPEN SWMM
    OPEN EPANET
    Journal
    Conference
    Consulting

JWMM Login

Verifying credentials wait Don't have an account?
Forgot your password?

Machine Learning Approach to Predict Discharge Magnification of Triangular Labyrinth Weir

Mohammad Danish Mustafa , Talib Mansoor and Mohammad Muzzammil (2026)
Zakir Husain College of Engineering and Technology, India
DOI: https://doi.org/10.14796/JWMM.C588
comment Discussion

Collapse all
Collapse all

Abstract

Triangular labyrinth weirs are widely used in hydraulic structures because they can pass higher flow rates under limited water head compared to conventional weirs. However, predicting how much additional discharge they can convey relative to a standard configuration is challenging due to complex flow behaviour and geometric effects. Existing empirical equations are often limited in their applicability to specific conditions.

In this study, four data-driven modeling approaches-Gaussian Process Regression (GPR), Support Vector Machine (SVM), Function Fitting Network (FITNET), and Multi-Layer Perceptron (MLP)-were developed and compared to estimate the relative increase in discharge for triangular labyrinth weirs. The analysis is based on 186 experimental observations covering a range of sidewall angles (15°, 25°, 30°, and 40°) and different numbers of cycles (3 to 5). The models use key geometric and hydraulic characteristics, expressed in normalized form, to capture the influence of flow depth and weir geometry.

Model performance was evaluated using standard statistical indicators of prediction accuracy. Among the tested approaches, GPR provided the most accurate predictions, significantly reducing error compared to the other models.

The results demonstrate that data-driven techniques can effectively represent the complex relationship between flow conditions and discharge performance. The proposed approach offers a reliable tool for the design and optimization of triangular labyrinth weirs, with potential applications in flood control and hydraulic structure safety.

1 Introduction

Dams built in ancient times generally served the purpose of water supply or irrigation. As civilizations developed, expanding water needs emerged, and nowadays, dams are constructed to serve multiple purposes like water supply, irrigation, flood control, navigation, sediment control, hydroelectric power generation, etc. Weirs are constructed as a spillway to safeguard the dams, particularly during floods, when excessive discharge is to be conveyed within a narrow waterway in a short span of time. Labyrinth weir having large crest lengths capable of passing maximum flood discharge with relatively low heads compared to linear weirs serves this purpose very well. Discharge over a labyrinth weir is illustrated in Figure 1, which shows a geometrical sketch of a triangular labyrinth weir.

Figure 1 Triangular labyrinth weir: (a) plan, (b) section at a – a.

The literature described above indicates that parameters affecting discharge coefficient Cd, and discharge magnification, Q/Qn are h/P (head-to-weir height ratio), h/w (relative overflow depth), w/p (relative weir cycle width), l/w (length magnification), α (side wall angle), and N (number of cycles). Here Q/Qn is the discharge over a linear weir, h is head over the weir, P is weir height, w is one cycle width, and l is one cycle crest length. Where α is added just to modify the flow magnification ratio in cases where low upstream flow depth requires greater accuracy from the normal weir flow equation.

Gentilini (Hager et al. 2015) conducted the first experimental study on sharp-crested oblique weirs and triangular labyrinth weirs with sidewall angles of 30°, 45°, and 60°. In their study, the discharge coefficient of the labyrinth weir (Cd) and the discharge coefficient of a corresponding normal weir (Cdn) were evaluated separately. The ratio of these two coefficients (Cd/Cdn) was then used to assess the relative discharge performance of the labyrinth weir.

Similarly, the upstream flow depth over the weir crest (h) and the channel width (W) were defined, and their ratio (h/W) was used to represent the relative head condition. The results were presented as plots of Cd/Cdn versus h/W, which showed that the relative discharge coefficient decreases with an increase in the relative head.

Hay and Taylor (1970) extensively investigated the performance of labyrinth weirs of rectangular, triangular, and trapezoidal plan forms. They presented the results in the magnification ratio of labyrinth weir discharge to straight linear weir discharge having the same channel width. They also provided a labyrinth weir design procedure, including criteria for estimating discharge over trapezoidal or triangular labyrinth weirs. Darvas (1971) Labyrinth weir design charts relate the discharge coefficient to the length magnification (l/w). The head ratio (H/P) is considered as a third governing parameter. Lux (1984) related discharge coefficient with a vertical aspect ratio w/p and shape constant k. Amanian (1987) studied triangular labyrinth weirs with half-round crests. He claimed that half-round crest shapes might pass more flow than other weirs at the same head. The study also suggests that the structure exhibits a trapezoidal geometry. Labyrinth weirs are more efficient than triangular labyrinth weirs. The trapezoidal apex affects flow efficiency but is suitable for field construction. Amanian (1987) observed a difference in Cd due to different aeration conditions but he did not define the curves for these conditions. Tullis et al. (1995) developed discharge coefficient equations for (h/P) for different sidewall angles (α) and proposed a procedure for designing a trapezoidal labyrinth weir. Ghodsian (2009) related discharge coefficient with (h/P) and length magnification (l/w). Kumar et al. (2011) performed experiments on a single cycle sharp crested Triangular labyrinth weir having different Sidewall angles (α = 15°, 30°, 45°, 60°, 75°, and 90°) and proposed a generalized equation for Cd as a function (h/P) and (α). Stefano and Ferro (2013) showed that dimensional analysis and an incomplete self-similarity approach can be used to deduce a general head discharge formula for a triangular labyrinth weir. They proposed a generalized formula based on the data of Kumar et al. (2011). Carollo et al. (2012) proposed Equation in terms of h/w and l/w with the two boundary conditions When h/w tends to zero, Q/Qn tends to length magnification l/w i.e. the behavior of the labyrinth weir tends to be ideal (Hay and Tayler 1970) When h/w tends to infinity, the labyrinth weir behaves as a normal weir. Therefore, Q/Qn = 1. Gupta et al. (2014) conducted an experimental study on a two-cycle triangular labyrinth weir. They proposed an equation for the discharge coefficient similar to Kumar et al. (2011) Carollo et al. (2012) Proposed stage-discharge relation for triangular labyrinth weirs in Equation 1:

Q over Q subscript n equal 1 plus fraction numerator open parentheses begin display style l over w end style minus 1 close parentheses over denominator b subscript 0 open parentheses begin display style h over w end style close parentheses to the power of b subscript 1 end exponent plus 1 end fraction (1)

Where:

b0 and b1 = coefficients, their values were determined using experimental data as 5.988 and 1.149, respectively; and
Qn = discharge over a normal weir placed in the same channel width and operating under similar hydraulic conditions, and the ratio of one cycle's crest length (l) and width (w) is length magnification.

This equation satisfies the two boundary conditions: (i) when head over the weir tends to zero, discharge magnification tends to length magnification, and (ii) when length magnification tends to unity, discharge magnification tends to unity (labyrinth weir reduces to normal weir). Bijankhan and Kouchakzadeh (2017) conducted experiments on a single-cycle triangular labyrinth weir having different sidewall angles (37°, 45°, 60°, and 90°) and proposed a unified formula for calculating Cd in both free and submerged flow conditions.

In recent years, artificial intelligence (AI) and soft computing techniques have been increasingly employed as powerful simulation tools for modeling complex and nonlinear hydraulic problems. These data-driven approaches have demonstrated strong potential in predicting the discharge characteristics of labyrinth weirs, where traditional empirical equations often fall short in generalization accuracy. Researchers have utilized a wide range of methods such as Artificial Neural Networks (ANN) (Mahmoud et al. 2021; Majidi Asl et al. 2024), SVM (Karami et al. 2017; Emami et al. 2022), Gene Expression Programming (GEP) (Roushangar et al. 2017), Adaptive Neuro-Fuzzy Inference Systems (ANFIS) (Izadbakhsh and Hajiabadi 2019; Mahmoud et al. 2021), Extreme Learning Machine (ELM) (Bilhan et al. 2018; Norouzi et al. 2020), and Gaussian Process Regression (GPR) (Seyedian et al. 2023) to predict the discharge coefficient or flow magnification of labyrinth weirs.

More recent works have integrated hybrid and optimization-enhanced Machine Learning (ML) frameworks such as Firefly-optimized SVR (Karami et al. 2018), Particle Swarm Optimization coupled with ANFIS (Mahmoud et al. 2021), Walnut-optimized SVR (Emami et al. 2022; Mustafa et al. 2022; Mustafa et al. 2025), and Hybrid Informed Multi-Layer Perceptron (HI-MLP) (Mahmoud et al. 2023), which further improved predictive performance and robustness across different geometric configurations. Similarly, ensemble and tree-based algorithms such as Quantile Regression Forest (QRF) (Salazar and Crookston 2019) and Light Gradient Boosting (LXGB) (Emami et al. 2023) have achieved high accuracy for triangular and trapezoidal labyrinth weirs. Comprehensive comparative analyses by Parsaie et al. (2023) and Seyedian et al. (2023) confirmed that AI methods-particularly GPR and deep neural models-outperform traditional empirical approaches in predicting labyrinth-weir discharge behaviour.

The literature confirms that machine learning (ML) presents a powerful alternative to empirical equations for modeling complex hydraulic structures. Several studies have applied individual ML techniques to predict the discharge coefficient (Cd) of labyrinth weirs. However, a systematic comparison of the predictive performance of advanced models like GPR, FITNET, and SVM specifically for predicting the discharge magnification (Q/Qn) of triangular labyrinth weirs is lacking. Furthermore, the potential of GPR to provide not only superior accuracy but also inherent uncertainty quantification-a critical feature for risk-informed engineering design-remains underexplored for this application.

The primary objectives of this study are to:

  1. Compile a comprehensive experimental dataset on the discharge magnification (Q/Qn) of triangular labyrinth weirs with varying sidewall angles (15°, 25°, 30°, 40°) and cycle numbers (3, 4, 5).
  2. Develop and train four distinct ML models- GPR, SVM, FITNET, and MLP for predicting Q/Qn using the dimensionless input parameters h/w and l/w.
  3. Rigorously evaluate and compare the predictive performance of these models using statistical metrics such as Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and the coefficient of determination (R²).
  4. Benchmark the accuracy of the best-performing ML model against a leading empirical formulation to quantitatively demonstrate the improvement in predictive capability.
  5. Assess the limitations and practical reliability of the optimal model, with a specific discussion on its performance in data-sparse regions of the parameter space.

2 Material and Methods

2.1 Experimental set-up and model fabrication

Experiments for the physical model were conducted within a rectangular cement-plastered masonry channel in the advanced hydraulics laboratory of the Civil Engineering Department at Aligarh Muslim University. This channel served as the primary test environment, measuring 15 m in length, 0.75 m in width, and 0.60 m in depth. Twelve sharp crested triangular labyrinth weirs were made of steel sheets with a thickness of 3 mm and a height of 20 cm. Out of twelve models, four models were of 3 cycles with the sidewall of 15°, 25°, 30°, and 40°, having a length magnification l/w of 3.84, 2.33, 1.99, and 1.53, four models of 4 cycles with the sidewall of 15°, 25°, 30°, and 40°, and l/w of (3.86, 2.35, 1.99, and 1.54) respectively, and four models of 5 cycles with a sidewall angle of 15°, 25°, 30°, and 40°. Figure 2 is a schematic representation of the experimental set-up of triangular labyrinth weir 3, 4, and 5 cycles.

Figure 2 Experimental set-up layout.

Water was supplied through a 17 cm diameter pipe connected to an overhead tank with an overflow mechanism to maintain a constant head. The water collected after flowing through the channel was directed into an underground sump and continuously pumped back up to the overhead tank to ensure a continuous flow. The photographic view of the triangular labyrinth weir with 3, 4, and 5 cycles is shown in Figure 3. Table 1 presents the details of the geometric parameters utilized in the current study. Measurements of the head over the weir were taken 1 m upstream of the labyrinth weir to minimize the influence of curvature, utilizing a pointer gauge with a precision of 0.1 mm The nappe beneath the weir was kept fully ventilated for all the runs. Discharge measurements were obtained using a calibrated sharp crested normal weir provided at the end of the drain.

Table 1 Range of geometric and flow parameters for triangular labyrinth weirs.

Model Q (m3/s) α (°) N L (m) h (m) P (m) Data
Model–1 0.0049–0.5512 15° 3 2.879 0.0099–0.0628 0.200 15
Model–2 0.0067–0.0056 25° 3 1.750 0.0152–0.0883 0.200 14
Model–3 0.0033–0.0491 30° 3 1.474 0.0114–0.0914 0.200 15
Model–4 0.0053–0.0531 40° 3 1.147 0.020–0.1073 0.200 15
Model–5 0.0037–0.0507 15° 4 2.859 0.0093–0.0718 0.200 15
Model–6 0.0051–0.0499 25° 4 1.762 0.0154–0.0941 0.200 16
Model–7 0.0045–0.5077 30° 4 1.475 0.0138–0.099 0.200 15
Model–8 0.0033–0.0508 40° 4 1.142 0.0149–0.1078 0.200 16
Model–9 0.0048–0.0581 15° 5 2.898 0.0104–0.0796 0.200 15
Model–10 0.0041–0.0486 25° 5 1.761 0.0144–0.0999 0.200 20
Model–11 0.0046–0.0492 30° 5 1.484 0.0148–0.102 0.200 15
Model–12 0.0052–0.1116 40° 5 1.156 0.019–0.1116 0.200 15
TOTAL DATA             186

NOTE: Q = Discharge, α = sidewall angle (degrees), N = number of cycles, L = crest length (m), h = head over weir (m), P = weir height (m).

Figure 3 Experimental set-up with a triangular labyrinth weir: (a) 3-cycle, (b) 4-cycle, and (c) 5-cycle.

2.2 Discharge head relation for labyrinth weir

A labyrinth weir is designed to increase discharge beyond that of a conventional weir by extending the effective crest length. This discharge magnification is a key performance criterion and is primarily influenced by the weir geometry and the operating head. To develop a dimensionless framework for analyzing this relationship, relevant geometric and flow parameters must be considered.

Q equal 2 over 3 C subscript d L square root of 2 g end root H subscript T to the power of 3 divided by 2 end exponent (2)

Where:

Cd = discharge coefficient,
L = crest length,
g = gravitational acceleration, and
HT = head over the weir.

Hay and Taylor (1970) proposed that the discharge magnification can be expressed as a function of dimensionless parameters derived from the weir geometry and flow conditions:

Q over Q subscript n equal italic chi open parentheses h over P comma space w over P comma l over w comma italic alpha comma N close parentheses (3)

Where:

Q/Qn = dimensionless discharge magnification,
Q = discharge over the labyrinth weir,
Qn = discharge over the normal weir,
χ = functional dependence,
h/P = head to weir height ratio,
w/P = relative crest width,
l/w = length magnification,
α = sidewall angle, and
N = number of weir cycles.

Carollo (2012) derived a modified dimensionless relationship for discharge magnification using the Buckingham π theorem:

Q over Q subscript n equal italic capital psi open parentheses h over w comma w over P comma l over w comma N close parentheses (4)

Where:

ψ = functional dependence, and
h/w = head to one cycle width.

Experimental analysis of both Carollo et al. (2012) data, and Gentilini’s (1941) data revealed that for α = 45° and N = 2, the parameter w/P has an insignificant effect on discharge magnification. Similarly, for α = 30° when N = 1 or 2, both w/P and N have a negligible impact. As a result, Equation 5 can be further simplified to:

Q over Q subscript n equal italic capital psi open parentheses h over w comma l over w close parentheses (5)

Consistent with the findings of Carollo et al. (2012) and supported by preliminary analysis of our dataset, the parameters h/w and l/w were selected as the primary inputs for the machine learning models, as they were found to be the most dominant factors influencing Q/Qn for the tested geometries This dimensionless formulation provides a generalized and scalable approach for analyzing labyrinth weir discharge performance, enabling better comparisons across different designs and flow conditions.

2.3 Machine learning methods

This section discusses the machine learning algorithms selected to predict discharge magnification. Using machine learning, GPR, SVM, FITNET and MLP. The principles of each method are explained and why they are suitable for this task. Details are also provided about the configurations and training parameters used for each model. This will help understand how these algorithms are customized to learn the complex relationships affecting discharge magnification for triangular labyrinth weir. GPR, SVM FITNET and MLP models were implemented in MATLAB.

Support Vector Regression models

Support vector machine (SVM) includes support vector classification (SVC) and support vector regression (SVR) algorithms (Cortes et al. 1995). The SVM maps the original data into a high-dimensional feature space. This is achieved through transformation by nonlinear mapping employing kernel functions such as sigmoid, polynomial, and radial basis functions. SVR is used for modeling and prediction wherein the aim is to find a function whose prediction errors are less than ε for all training data. The non-linear model of the SVR is generally used in the field of science and engineering.

SVM is a classification and regression algorithm known as SVC and SVR. SVM maps the original data into a feature space of high dimensionality using kernel functions like sigmoid, polynomial, and radial basis functions.

The linear model of SVR is given by Equation 6:

y equal f open parentheses x close parentheses equal open parentheses italic omega comma italic ϕ open parentheses x close parentheses close parentheses plus b (6)

Where:

x = input feature vector,
y = predicted output (discharge magnification),
Φ(x) = nonlinear mapping function,
ω = weight vector in feature space, and
b = bias term.

The goal is to reduce the difference between the model and actual outputs. For this purpose, the objective function mentioned below is minimized using the second-order optimization method:

m i n i m i z e space 1 over 2 parallel to w parallel to to the power of 2 plus C sum subscript i equal 1 end subscript superscript n open parentheses italic xi subscript i plus italic xi subscript i superscript asterisk times close parentheses (7)

Subject to:

y subscript i minus open angle brackets open parentheses w comma italic ϕ open parentheses x subscript i close parentheses close parentheses plus b close angle brackets less or equal than italic epsilon plus italic xi subscript i comma
for all i equal 1 comma 2 comma space... space comma n
(8)
open angle brackets open parentheses w comma italic ϕ open parentheses x subscript i close parentheses close parentheses plus b close angle brackets minus y subscript i less or equal than italic epsilon plus italic xi subscript i superscript asterisk times comma
for all i equal 1 comma 2 comma space... space comma n
(9)
italic xi subscript i comma italic xi subscript i superscript asterisk times greater or equal than 0 comma
for all i equal 1 comma 2 comma space... space comma n
(10)

Where:

C = regularization parameter,
Syntax error. = slack variables representing upper and lower deviations,
ε = insensitive loss function parameter,
n = number of training samples,
w = weight vector, and
⟨⋅⟩ = inner product in feature space.

The parameters C, γ, and ε are hyperparameters of the SVR model and are tuned externally (using a grid search approach) to achieve optimal predictive performance.

Gaussian Process Regression (GPR)

Gaussian Process Regression, a non-parametric Bayesian regression model, has gained attention for engineering applications. Unlike parametric models like neural networks, GPR assumes that adjacent observations share information, creating a prior directly over function space (Rasmussen and Williams 2006). It provides a probabilistic framework for predictions.

A GPR is defined as a collection of random variables where any finite subset has a joint Gaussian distribution. For GPR, the relationship between inputs X and outputs Y is modeled using Equation 11:

y equal f open parentheses x close parentheses plus italic xi (11)

Where:

ξ = observational error and has equivalent zero mean value distribution (μ(x) = 0), variance σ2, and
f(x) = GPR function values.

The kernel function is used to determine the joint distribution in Equation 12:

open square brackets table row y row cell y subscript asterisk times end cell end table close square brackets tilde N open parentheses 0 comma open square brackets table row cell K open parentheses X comma X close parentheses plus italic sigma subscript n superscript 2 I subscript n end cell cell K open parentheses x subscript asterisk times comma X close parentheses to the power of T end cell row cell K open parentheses x subscript asterisk times comma X close parentheses end cell cell K open parentheses x subscript asterisk times comma x subscript asterisk times close parentheses end cell end table close square brackets close parentheses (12)

Where:

Syntax error. = noise variance, and
Iₙ = identity matrix.

Syntax error. is defined using Equation 13:

K open parentheses x subscript asterisk times comma X close parentheses equal open square brackets k open parentheses x subscript asterisk times comma x subscript 1 close parentheses comma k open parentheses x subscript asterisk times comma x subscript 2 close parentheses comma space... space comma k open parentheses x subscript asterisk times comma x subscript n close parentheses close square brackets (13)

Where:

Syntax error. = training input matrix,
Syntax error. = training output vector,
x* = test input,
y* = test output dataset,
σn = noise variance, and
In = identity matrix of size n×n.

The predictor distribution over y* is expressed in Equation 14 as

P open parentheses y subscript asterisk times vertical line X comma y comma x subscript asterisk times close parentheses tilde N open parentheses stack y subscript asterisk times with bar on top comma c o v left parenthesis y subscript asterisk times right parenthesis close parentheses (14)

Where:

top enclose y subscript asterisk times end enclose equal K open parentheses x subscript asterisk times comma X close parentheses open square brackets K open parentheses X comma X close parentheses plus italic sigma subscript n superscript 2 I subscript n close square brackets to the power of minus 1 end exponent y (15)
c o v open parentheses y subscript asterisk times close parentheses equal K open parentheses x subscript asterisk times comma x subscript asterisk times close parentheses minus K open parentheses x subscript asterisk times comma X close parentheses open square brackets K open parentheses X comma X close parentheses plus italic sigma subscript n superscript 2 I subscript n close square brackets to the power of minus 1 end exponent K open parentheses x subscript asterisk times comma X close parentheses to the power of T (16)

In the present study, squared exponential kernels were used that can be expressed in Equation 17 as:

k open parentheses x subscript i comma x subscript j close parentheses equal italic sigma subscript f superscript 2 e x p open parentheses minus 1 over 2 open vertical bar x subscript i minus x subscript j close vertical bar to the power of 2 over italic gamma to the power of 2 close parentheses (17)

Where:

Syntax error. = signal variance (controls the magnitude of function variation),
γ = length-scale parameter controlling smoothness of the function, and
xi and xj = input feature vectors.

The set of hyperparameters is defined as  Syntax error.(where γ is the length scale parameter, Syntax error. is the signal variance, and Syntax error. is the noise variance. These hyperparameters are estimated by maximizing the log marginal likelihood function as:

L open parentheses italic eta close parentheses equal italic log P open parentheses y space left enclose X comma italic eta end enclose close parentheses space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space space
equal minus 1 over 2 y to the power of T open square brackets K open parentheses X comma X close parentheses plus italic sigma subscript n superscript 2 I subscript n close square brackets to the power of minus 1 end exponent y minus 1 over 2 italic log open vertical bar K open parentheses X italic comma X close parentheses italic plus italic sigma subscript n superscript 2 I subscript n close vertical bar italic minus n over 2 italic log 2 italic pi (18)

To terminate a training program, the specified conditions must be satisfied.

Function Fitting Network (FITNET)

FITNET is a specialized type of neural network designed for regression and curve-fitting tasks. It operates as a MLP model, which maps input features to continuous target outputs through a process known as function fitting. The architecture of FITNET includes an input layer that accepts the features, a single hidden layer with a configurable number of neurons, and an output layer with a linear activation function. The hidden layer employs nonlinear activation functions, such as sigmoid, tanh, or ReLU, to capture complex, nonlinear relationships within the data. The linear activation in the output layer ensures that the network is suitable for generating continuous predictions. FITNET is trained using algorithms such as Levenberg-Marquardt (trainlm) or scaled conjugate gradient (trainscg), which optimize the network's weights by minimizing a specified loss function, typically the Mean Squared Error (MSE). This iterative training process involves forward propagation of inputs, error calculation, and backpropagation to update the weights for improved accuracy. FITNET is particularly well-suited for small to moderately complex datasets and is commonly applied in fields such as scientific modeling, system identification, and financial forecasting. While FITNET is efficient and easy to implement, its architecture-with a single hidden layer-may limit its ability to model highly complex relationships in larger or more intricate datasets.

Multi-layer Perceptron (MLP)

In this study, MLP is employed, a class of feedforward artificial neural networks, to model the relationship between input features and target outputs. The MLP consists of an input layer, one or more hidden layers, and an output layer. Each layer is composed of multiple neurons, which apply a non-linear activation function to the weighted sum of their inputs. The input layer receives the feature vectors, while the hidden layers transform the data through a series of non-linear mappings. The output layer produces the final predictions, such as class labels or continuous values, depending on the task. The model is trained using backpropagation with gradient descent to minimize a loss function, such as cross-entropy for classification or mean squared error for regression. To prevent overfitting, regularization techniques such as dropout or L2 regularization are applied. The MLP's ability to approximate complex, non-linear functions make it a suitable choice for capturing intricate patterns in the data.

2.4 Data preprocessing and model training

All machine learning models were developed and trained in MATLAB R2023a using the Statistics and Machine Learning Toolbox and the Neural Network Toolbox. Hyperparameters for each model were randomly divided into 80% for training and 20% for testing and grid search approach to minimize the MAPE on the validation dataset. The optimal parameters were as follows: for the GPR model, a squared exponential (RBF) kernel with a length scale of 0.43 and a noise level (σₙ) of 0.012 were used; for the SVR model, the RBF kernel was adopted with a regularization parameter C=15, epsilon ε=0.001, and kernel scale γ=0.25; and for the FITNET, a (2–10–1) architecture with a tangent-sigmoid activation in the hidden layer, linear activation in the output layer, Levenberg-Marquardt training algorithm, learning rate of 0.01, and 1000 epochs was employed. The dataset and MATLAB scripts used to produce the results are available from the corresponding author upon reasonable request, ensuring reproducibility of the analysis.

2.5 Criteria evaluations

The accuracy of the prediction models in the present study has been examined using three different statistical indices Mean Absolute Percentage Error (MAPE), coefficient of determination R2, and Root Mean Square Error (RMSE), as defined in Table 2. The best model is one where MAPE and RMSE tends to zero and R2 tends to one. The metrics mentioned above are expressed by the following Equations (19), (20), and (21):

Table 2 Statistical indices.

Performance parameters Expressions for performance parameters Equations
RMSE R M S E equal square root of sum subscript i equal 1 end subscript superscript N open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript o minus open parentheses begin display style Q over Q subscript n end style close parentheses subscript p close parentheses to the power of 2 over N end root (19)
R2 R to the power of 2 equal open square brackets fraction numerator begin display style 1 over N end style sum subscript i equal 1 end subscript superscript N open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript o minus stack open parentheses begin display style Q over Q subscript n end style close parentheses subscript o with bar on top close parentheses open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript p minus stack open parentheses begin display style Q over Q subscript n end style close parentheses subscript p with bar on top close parentheses over denominator blank root of sum subscript i equal 1 end subscript superscript N open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript o minus stack open parentheses begin display style Q over Q subscript n end style close parentheses subscript o with bar on top close parentheses to the power of 2 end root blank root of sum subscript i equal 1 end subscript superscript N open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript p minus stack open parentheses begin display style Q over Q subscript n end style close parentheses subscript p with bar on top close parentheses to the power of 2 end root end fraction close square brackets to the power of 2 (20)
MAPE M A P E equal 100 over N sum subscript i equal 1 end subscript superscript N fraction numerator open vertical bar open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript o minus open parentheses begin display style Q over Q subscript n end style close parentheses subscript p close parentheses close vertical bar over denominator open parentheses open parentheses begin display style Q over Q subscript n end style close parentheses subscript o close parentheses end fraction (21)
 

NOTE: open parentheses Q over Q subscript n close parentheses subscript o = Observed Discharge Magnification, and
open parentheses Q over Q subscript n close parentheses subscript p= Predicted Discharge Magnification

3 Results and Discussion

The present study investigated the hydraulic performance of triangular labyrinth weirs with varying sidewall angles (15°, 25°, 30°, and 40°) and cycle numbers (3, 4, 5) by evaluating the discharge magnification ratio (Q/Qn). The experimental data were utilized to develop predictive models using SVM and GPR techniques. Dimensionless parameters such as l/w and h/w were considered as input variables, while Q/Qn was the output variable. The dataset was divided into training and testing phases with different ratios (60/40, 70/30, 75/25, and 80/20) to identify the optimal split for model performance. It was observed that an 80% training and 20% testing split yielded the best results across most machine learning techniques, minimizing overfitting and underfitting issues.

The performance of the GPR, FITNET, SVM, and MLP models was evaluated using statistical indices such as MAPE, RMSE, and R². Table 3 shows the results for training and testing of model. The GPR model showed superior performance in both training and testing phases. In the training, the MAPE and RMSE were 2.03% and 0.0449, respectively, while in the testing, these were 2.22% and 0.0701. The R² of 0.99 in both phases indicates a strong correlation between the predicted and observed results. GPR model showed the lowest RMSE values in both phases. In the training phase, the RMSE of GPR (0.0449) which was 23.0% lower than that of SVM (0.0524) and 22.9% lower than that of FITNET (0.0582). In the testing phase, the RMSE of GPR (0.0701) was 13.1% lower than that of SVM (0.06196) and 37.2% lower than that of FITNET (0.0511). These reductions show the GPR model's ability to minimize prediction errors more effectively than that of other models. The FITNET model also performed well, with MAPE values of 2.25% and 2.31% in the training and testing phases, respectively. The RMSE values were 0.0582 and 0.0511, with an R² of 0.99 in both training and testing phases. While FITNET showed competitive performance, it was outperformed by GPR in terms of error reduction. SVM model exhibited strong performance, with MAPE values of 1.93% and 2.42% in the training and testing phases, respectively. The RMSE were 0.0524 and 0.06196, with an R² of 0.99 in both training and testing phases, respectively. Despite its high accuracy, the SVM model was less effective than GPR in minimizing errors. The MLP model had the highest MAPE and RMSE values among the four models, with MAPE of 3.23% and 4.10% in the training and testing phases. The RMSE values were 0.0711 and 0.0843, with an R² of 0.99 in both phases. While the MLP model provided reasonable predictions, its performance was inferior to the other models, particularly in error minimization.

Table 3 Performance metrics of soft computing techniques.

Model Training Testing
MAPE RMSE R2 MAPE RMSE R2
GPR 2.03 0.0449 0.99 2.22 0.0701 0.99
FITNET 2.25 0.0582 0.99 2.31 0.0511 0.99
SVM 1.93 0.0524 0.99 2.42 0.0620 0.99
MLP 3.23 0.0711 0.99 4.10 0.0843 0.99

Figure 4 shows the scatter diagrams for the training and testing, the closer that the data points lie to the 1:1 line, the better the model's prediction accuracy. GPR model exhibited the best alignment with the 1:1 line, followed by SVM and FITNET, while MLP showed slightly more dispersion.

Figure 4 Predicted discharge magnification of: (a) GPR, (b) FITNET, (c) SVR, and (d) MLP.

The experimental data distribution (Figure 4) shows concentration in the 1.0 < Q/Qn < 2.5 range, with sparse representation at higher magnification ratios (>2.5). This distribution has important implications for model reliability: All models demonstrate high accuracy (R² > 0.99) within the well-sampled range, with GPR showing particular robustness. For Q/Qn values exceeding 2.5, model predictions should be treated with caution due to limited training examples. The GPR model provides inherent uncertainty quantification through prediction variance, which serves as a reliability indicator. Models are validated for Q/Qn ≥ 1, with performance degradation expected outside the trained parameter space. For practical applications, we recommend using the models primarily for interpolation within the demonstrated range.

The results highlight the effectiveness of GPR in predicting the discharge magnification for triangular labyrinth weirs. The model minimizes errors and maintains high accuracy in both training and testing phases, which underscores its robustness. The superior performance of GPR can be attributed to its capability to handle non-linear relationships and provide probabilistic predictions, making it well-suited for hydraulic engineering applications. FITNET and SVM models also demonstrated good performance. However, their slightly higher MAPE and RMSE values compared to GPR indicate that they are less effective in capturing the complex relationships within the data. The MLP model, while providing reasonable predictions, was the least accurate, likely due to its sensitivity to hyperparameter tuning and dataset size.

4 Conclusion

This study developed and compared four machine learning models for predicting the discharge magnification (Q/Qn) of triangular labyrinth weirs. Based on 186 experimental data points, the GPR model emerged as the most accurate and robust, achieving a test MAPE of 2.22% and RMSE of 0.0701. This performance signifies an error reduction of 13% against SVM and 37% against FITNET. The primary limitation of the current study is the sparsity of data at very high Q/Qn values, which suggests that the models are most reliable for interpolation within the trained range. The GPR framework presented herein offers hydraulic engineers a powerful, data-driven tool for the effective design and analysis of labyrinth weirs, with its inherent uncertainty quantification being a key asset for risk-informed decision-making in flood management applications.

References

  1. Amanian, N. 1987. “Performance and Design of Labyrinth Spillways.” Master's thesis, Utah State University. https://doi.org/10.26076/ecff-f19f
  2. Bijankhan, M. and S. Kouchakzadeh. 2017. “Unified discharge coefficient formula for free and submerged triangular labyrinth weirs.” Flow Measurement and Instrumentation 57: 46–56. https://doi.org/10.1016/j.flowmeasinst.2017.08.007
  3. Bilhan, O., M.E. Emiroglu, C.J. Miller, and M. Ulas. 2018. “The evaluation of the effect of nappe breakers on the discharge capacity of trapezoidal labyrinth weirs by ELM and SVR approaches.” Flow Measurement and Instrumentation 64, 71–82. https://doi.org/10.1016/j.flowmeasinst.2018.10.009
  4. Carollo, F.G., V. Ferro, and V. Pampalone. 2012. “Experimental Investigation of the Outflow Process over a Triangular Labyrinth-Weir.” Journal of Irrigation and Drainage Engineering 138, 1. https://doi.org/10.1061/(ASCE)IR.1943-4774.0000366
  5. Cortes, C. and V. Vapnik. 1995. “Support-Vector Networks.” Machine Learning 20 (3): 273–297. https://doi.org/10.1007/BF00994018
  6. Darvas, L. 1971. “Discussion of performance and design of labyrinth weirs.” Journal of the Hydraulics Division 97, 8. https://doi.org/10.1061/JYCEAJ.0003056
  7. Emami, H., S. Emami, and J.A. Parsa. 2022 “Walnut optimization algorithm applied to discharge coefficient prediction on labyrinth weirs.” Soft Computing 26 (22): 12197–12215. https://doi.org/10.1007/s00500-022-07041-8
  8. Emami, S., H. Emami, and J. Parsa. 2023. “LXGB: a machine learning algorithm for estimating the discharge coefficient of pseudo-cosine labyrinth weir.” Scientific Reports 13 (1): 12304. https://doi.org/10.1038/s41598-023-39272-6
  9. Gentilini, B. 1941. “Stramazzi con cresta a pianta obliqua e a zig-zag (Weirs with oblique and zig-zag crests).” L’Energia Elettrica 18 (10): 653–664 (in Italian).
  10. Ghodsian. M. 2009. “Stage-discharge relationship for a triangular labyrinth spillway”. Proceedings of the Institution of Civil Engineers – Water Management 162 (3): 173–178. https://doi.org/10.1680/wama.2009.00033
  11. Gupta, K.K., S. Kumar, and Z. Ahmad. 2014. “An approach to analyze the flow characteristics of sharp-crested triangular planform contracted weirs.” World Applied Science Journal 32 (7): 1311–1317.
  12. Hager, W.H., M. Pfister, and B.P. Tullis. 2015. “Labyrinth weirs: Developments until 1985.” In: E-Proceedings of the 36th IAHR World Congress, June 28–July 3, 2015, The Hague, Netherlands.
  13. Hay, N. and G. Taylor. 1970. “Performance and Design of Labyrinth Weirs.” Journal of Hydraulic Engineering 96 (11): 2337–2357. https://doi.org/10.1061/JYCEAJ.0002766
  14. Izadbakhsh, M. and R. Hajiabadi. 2019. “Modeling discharge capacity of labyrinth weirs through a learning machine approach”. Journal of Applied Research in Water and Wastewater 12, 100–108.
  15. Karami, H., S. Karimi, H. Bonakdari, and S. Shamshirband. 2018. “Predicting discharge coefficient of triangular labyrinth weir using extreme learning machine, artificial neural network and genetic programming.” Neural Computing and Applications 29, 983–9. https://doi.org/10.1007/s00521-016-2588-x
  16. Karami, H., S. Karimi, M. Rahmanimanesh, and S. Farzin. 2017. “Predicting discharge coefficient of triangular labyrinth weir using support vector regression, support vector regression-firefly, response surface methodology and principal component analysis”. Flow Measurement and Instrumentation 55, 75–81. http://dx.doi.org/10.1016/j.flowmeasinst.2016.11.010
  17. Kumar, S., Z. Ahmad, and T. Mansoor. 2011. “A new approach to improve the discharging capacity of sharp-crested triangular plan form weirs.” Flow Measurement and Instrumentation 22 (3):175–180. https://doi.org/10.1016/j.flowmeasinst.2011.01.006
  18. Lux, F.I. 1984. "Discharge characteristics of labyrinth weirs." In: Proceedings of the Conference on Water Resources Development. American Society of Civil Engineers (ASCE), Reston, Virginia, USA.
  19. Mahmoud, A., T. Hu, X. Zeng, P. Jing, X. Li, and E. Da Costa Ribeiro. 2023. “Hydraulic informed multi-layer perceptron for estimating discharge coefficient of labyrinth weir.” Journal of Hydrology 123 (C): 106435. https://doi.org/10.1016/j.engappai.2023.106435
  20. Mahmoud, A., X. Yuan, T. Hajilounezhad, and Y. Yuan. 2021 “Investigation on labyrinth spillway multi-objective optimization with an emphasis on predicting discharge coefficient through different artificial neural networks.” Measurement 174, 109036. https://doi.org/10.1016/j.measurement.2021.109036
  21. Majedi-Asl, M., A. Ghaderi, M. Kouhdaragh, and O.T. Alavian. 2024. “A performance comparison of the meta model methods for discharge coefficient prediction of labyrinth weirs.” Flow Measurement and Instrumentation 96, 102563. https://doi.org/10.1016/j.flowmeasinst.2024.102563
  22. Mustafa, M.D., T. Mansoor, and M. Muzzammil. 2022. “Support vector machine (SVM) approach to develop the discharge prediction model for triangular labyrinth weir.” Water Supply 22 (12): 8942–8956. https://doi.org/10.2166/ws.2022.393
  23. Mustafa, M.D., T. Mansoor, and M. Muzzammil. 2025. “Prediction of Discharge Coefficient of Staged Trapezoidal Labyrinth Weir Using Support Vector Machine (SVM) and Nonlinear Regression (NLR)” In: Pandey, M., Umamahesh, N.V., Ahmad, Z., Oliveto, G. (eds), Hydraulics and Fluid Mechanics, Volume 1. HYDRO 2023. Lecture Notes in Civil Engineering, Vol 547. Springer, Singapore. https://doi.org/10.1007/978-981-97-8035-8_20
  24. Norouzi, P., A. Rajabi, M.A. Izadbakhsh, S. Shabanlo, F. Yosefvand, and B. Yaghoubi. 2020. “A New Non-Tuned Self-Adaptive Machine-Learning Approach for Simulating the Discharge Coefficient of Labyrinth Weirs.” Irrigation and Drainage 69 (3): 398–416. https://doi.org/10.1002/ird.2423
  25. Parsaie, A., S.D. Behbahani, A.A. Chadee, and A.H. Haghiabi. 2023. “Estimating the energy dissipation of flow passing over triangular and trapezoidal plan weirs using the GMDH model.” Water Practice and Technology 18 (5): 1115–1124. https://doi.org/10.2166/wpt.2023.073
  26. Rasmussen, C.E. and C.K.I. Williams. 2006. Gaussian Processes for Machine Learning. MIT Press, Cambridge, MA.
  27. Roushangar, K., M.T. Alami, and M.M. Asl, and J. Shiri. 2017. “Modeling Discharge Coefficient of Normal and Inverted Orientation Labyrinth Weirs Using Machine Learning Techniques”. ISH Journal of Hydraulic Engineering 23 (3): 331–340. https://doi.org/10.1080/09715010.2017.1327333
  28. Salazar, F. and B.M. Crookston. 2019. “A performance comparison of machine learning algorithms for arced labyrinth spillways.” Water (Switzerland) 11 (3): 544. https://doi.org/10.3390/w11030544
  29. Seyedian, S.M., A.H. Haghiabi, and A. Parsaie. 2023. “Reliable prediction of the discharge coefficient of triangular labyrinth weir based on soft computing techniques.” Flow Measurement and Instrumentation 92, 102403. https://doi.org/10.1016/j.flowmeasinst.2023.102403
  30. Stefano, C.D. and V. Ferro. 2013. “A New Approach for Deducing the Stage-Discharge Relationship of Triangular in Plan Sharp-Crested Weirs.” Flow Measurement and Instrumentation 32, 71–75. https://doi.org/10.1016/j.flowmeasinst.2013.04.004
  31. Tullis, J.P., N.A. Amanian, and D. Waldron. 1995. “Design of labyrinth spillways”. Journal of Hydraulic Engineering 121 (3): 247–255. https://doi.org/10.1061/(ASCE)0733-9429(1995)121:3(247)

Image


ABOUT THIS PAPER
CITED BY
No data available
VIEWS
122

PAPER INFO

Identification

CHI ref #: C588 205002
Volume: 34
DOI: https://doi.org/10.14796/JWMM.C588
Cite as: JWMM 34: C588

Publication History

Received: February 09, 2025
1st decision: June 11, 2025
Accepted: January 06, 2026
Published: July 10, 2026

Status

Reviewers: 2
Version: Final published

Copyright

© Mustafa et al. 2026
Some rights reserved.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

The Journal of Water Management Modeling is an open-access (OA) publication. Open access means that articles and papers are available without barriers to all who could benefit from them. Practically speaking, all published works will be available to a worldwide audience, free, immediately on publication. As such, JWMM can be considered a Diamond, Gratis OA journal.

All papers published in the JWMM are licensed under a Creative Commons Attribution 4.0 International License (CC BY).

JWMM content can be downloaded, printed, copied, distributed, and linked-to, when providing full attribution to both the author/s and JWMM.


AUTHORS

Mohammad Danish Mustafa

Zakir Husain College of Engineering and Technology, Aligarh, UP, India
Contribution: Conception and design, Analysis and interpretation of data, Drafting or revising article and Critical review of article
For correspondence: dmmustafa786@gmail.com
No competing interests declared
ORCiD:

Talib Mansoor

Zakir Husain College of Engineering and Technology, Aligarh, UP, India
Contribution: Critical review of article
No competing interests declared
ORCiD:

Mohammad Muzzammil

Zakir Husain College of Engineering and Technology, Aligarh, UP, India
Contribution: Critical review of article
No competing interests declared
ORCiD:

ADDITIONAL DATA

 wait

DISCUSSION

Be the first to comment.

RELATED PAPERS

 wait


TAGS

 wait

Connect With Us

Journal of Water Management Modeling (JWMM)
ISSN: 2292-6062

  info@chijournal.org

147 Wyndham St. N., Ste. 202
Guelph, Ontario, Canada, N1H 4E9
About JWMM

Mission and intent

Editorial board

Review process

Disclaimer

Privacy policy

For Authors

Guide for authors

Submit your paper

Author checklist

JWMM paper template

Reference guide

Unit conversion table

For Reviewers

Guide for reviewers

Reviewing guidelines

Criteria to be used

Standards of acceptance


Copyright 2026 by CHI