Javascript is required
1.
N. Byaruhanga, D. Kibirige, S. Gokool, and G. Mkhonta, “Evolution of flood prediction and forecasting models for flood early warning systems: A scoping review,” Water, vol. 16, no. 13, p. 1763, 2024. [Google Scholar] [Crossref]
2.
D. Mandal, L. Zou, A. Wadhwa, R. S. Wilkho, Z. Cai, B. Zhou, X. Ye, G. Newman, N. Gharaibeh, and B. Güneralp, “FlowsDT: A geospatial digital twin for navigating urban flood dynamics,” Comput. Environ. Urban Syst., vol. 126, p. 102414, 2026. [Google Scholar] [Crossref]
3.
R. Chen, S. Li, J. Liu, and B. Deng, “Integrated real-time mapping and forecasting of flood inundation in large-scale digital twins basins based on physics-informed graph neural network,” Eng. Rep., vol. 8, no. 5, p. e70798, 2026. [Google Scholar] [Crossref]
4.
Y. Abadade, A. Temouden, H. Bamoumen, N. Benamar, Y. Chtouki, and A. S. Hafid, “A comprehensive survey on TinyML,” IEEE Access, vol. 11, pp. 96892–96922, 2023. [Google Scholar] [Crossref]
5.
Z. Zhang and J. Li, “A review of artificial intelligence in embedded systems,” Micromachines, vol. 14, no. 5, p. 897, 2023. [Google Scholar] [Crossref]
6.
K. Plataridis and Z. Mallios, “Flood susceptibility mapping using hybrid models optimized with artificial bee colony,” J. Hydrol., vol. 624, p. 129961, 2023. [Google Scholar] [Crossref]
7.
A. Yaseen, J. Lu, and X. Chen, “Flood susceptibility mapping in an arid region of Pakistan through ensemble machine learning model,” Stoch. Environ. Res. Risk Assess., vol. 36, no. 10, pp. 3041–3061, 2022. [Google Scholar] [Crossref]
8.
C. Singha, K. C. Swain, M. Meliho, H. G. Abdo, H. Almohamad, and M. Al-Mutiry, “Spatial analysis of flood hazard zoning map using novel hybrid machine learning technique in Assam, India,” Remote Sens., vol. 14, no. 24, p. 6229, 2022. [Google Scholar] [Crossref]
9.
M. Waqas and U. W. Humphries, “A critical review of RNN and LSTM variants in hydrological time series predictions,” MethodsX, vol. 13, p. 102946, 2024. [Google Scholar] [Crossref]
10.
L. Fang and D. Shao, “Application of long short-term memory (LSTM) on the prediction of rainfall-runoff in Karst area,” Front. Phys., vol. 9, p. 790687, 2022. [Google Scholar] [Crossref]
11.
V. Borisov, T. Leemann, K. Seßler, J. Haug, M. Pawelczyk, and G. Kasneci, “Deep neural networks and tabular data: A survey,” IEEE Trans. Neural Netw. Learn. Syst., vol. 35, no. 6, pp. 7499–7519, 2024. [Google Scholar] [Crossref]
12.
Z. Gaffoor, K. Pietersen, N. Z. Jovanovic, A. Bagula, T. Kanyerere, O. Ajayi, and G. Wanangwa, “A comparison of ensemble and deep learning algorithms to model groundwater levels in a data-scarce aquifer of Southern Africa,” Hydrology, vol. 9, no. 7, p. 125, 2022. [Google Scholar] [Crossref]
13.
G. V. Rao, N. R. Nagireddy, V. R. Keesara, and V. Sridhar, “Real-time flood forecasting using an integrated hydrologic and hydraulic model for the Vamsadhara and Nagavali basins, Eastern India,” Nat. Hazards, vol. 120, no. 7, pp. 6011–6039, 2024. [Google Scholar] [Crossref]
14.
G. Varlas, A. Papadopoulos, G. Papaioannou, V. Markogianni, A. Alamanos, and E. Dimitriou, “Integrating ensemble weather predictions in a hydrologic-hydraulic modelling system for fine-resolution flood forecasting: The case of Skala Bridge at Evrotas River, Greece,” Atmosphere, vol. 15, no. 1, p. 120, 2024. [Google Scholar] [Crossref]
15.
D. H. Nguyen, X. H. Le, J. Y. Heo, and D. H. Bae, “Development of an extreme gradient boosting model integrated with evolutionary algorithms for hourly water level prediction,” IEEE Access, vol. 9, pp. 125853–125867, 2021. [Google Scholar] [Crossref]
16.
R. Graf, T. Kolerski, and S. Zhu, “Predicting ice phenomena in a river using the artificial neural network and extreme gradient boosting,” Resources, vol. 11, no. 2, p. 12, 2022. [Google Scholar] [Crossref]
17.
M. Niazkar, A. Menapace, B. Brentan, R. Piraei, D. Jimenez, P. Dhawan, and M. Righetti, “Applications of XGBoost in water resources engineering: A systematic literature review (Dec 2018–May 2023),” Environ. Model. Softw., vol. 174, p. 105971, 2024. [Google Scholar] [Crossref]
18.
T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 2016, pp. 785–794. [Google Scholar] [Crossref]
19.
A. Muhebwa, C. J. Gleason, D. Feng, and J. Taneja, “Improving discharge predictions in ungauged basins: Harnessing the power of disaggregated data modeling and machine learning,” Water Resour. Res., vol. 60, no. 9, p. e2024WR037122, 2024. [Google Scholar] [Crossref]
20.
S. C. Ibañez, C. V. G. Dajac, M. P. Liponhay, E. F. T. Legara, J. M. H. Esteban, and C. P. Monterola, “Forecasting reservoir water levels using deep neural networks: A case study of Angat Dam in the Philippines,” Water, vol. 14, no. 1, p. 34, 2022. [Google Scholar] [Crossref]
21.
S. Hitouri, M. Mohajane, M. Lahsaini, S. A. Ali, T. A. Setargie, G. Tripathi, P. D’Antonio, S. K. Singh, and A. Varasano, “Flood susceptibility mapping using SAR data and machine learning algorithms in a small watershed in northwestern Morocco,” Remote Sens., vol. 16, no. 5, p. 858, 2024. [Google Scholar] [Crossref]
22.
J. Huang, L. Li, and Z. Li, “Integrated flood risk early warning for adaptive emergency management: The IFloPhy framework coupling machine learning and physical models,” Risk Anal., vol. 45, no. 12, pp. 4672–4690, 2025. [Google Scholar] [Crossref]
23.
J. H. Hong and Y. T. Shi, “Integration of heterogeneous sensor systems for disaster responses in smart cities: Flooding as an example,” ISPRS Int. J. Geo-Inf., vol. 12, no. 7, p. 279, 2023. [Google Scholar] [Crossref]
24.
J. A. J. P. Soares, A. K. S. Soares, L. F. Satolo, G. B. Scofield, S. Stephany, and L. B. L. Santos, “Uncertainty-aware machine learning models for flash flood prediction,” Trans. GIS, vol. 30, no. 2, p. e70254, 2026. [Google Scholar] [Crossref]
25.
W. Raza, A. Osman, F. Ferrini, and F. De Natale, “Energy-efficient inference on the edge exploiting TinyML capabilities for UAVs,” Drones, vol. 5, no. 4, p. 127, 2021. [Google Scholar] [Crossref]
26.
B. Sudharsan, J. G. Breslin, M. Tahir, M. I. Ali, O. Rana, S. Dustdar, and R. Ranjan, “OTA-TinyML: Over the air deployment of TinyML models and execution on IoT devices,” IEEE Internet Comput., vol. 26, no. 3, pp. 69–78, 2022. [Google Scholar] [Crossref]
27.
E. Manor and S. Greenberg, “Custom hardware inference accelerator for TensorFlow Lite for microcontrollers,” IEEE Access, vol. 10, pp. 73484–73493, 2022. [Google Scholar] [Crossref]
28.
V. M. Fridous, A. Agarwal, K. B. Bhaskar, V. Nandagopal, and N. Sivakamasundari, “Optimization and benchmarking of lightweight neural networks for efficient embedded AI deployment,” Eng. Rep., vol. 8, no. 5, p. e70814, 2026. [Google Scholar] [Crossref]
29.
S. Choosumrong, K. Piyathamrongchai, R. Hataitara, U. Soteyome, N. Konkong, R. Chalongsuppunyoo, V. Raghavan, and T. Nemoto, “Development of an IoT-based flood monitoring system integrated with GIS for lowland agricultural areas,” Sensors, vol. 25, no. 17, p. 5477, 2025. [Google Scholar] [Crossref]
30.
L. Mdegela, Y. De Bock, E. Municio, E. Luhanga, J. Leo, and E. Mannens, “A multi-modal wireless sensor system for river monitoring: A case for Kikuletwa River floods in Tanzania,” Sensors, vol. 23, no. 8, p. 4055, 2023. [Google Scholar] [Crossref]
31.
V. Wiangnak, M. Wiboonrat, and S. Duangsuwan, “Development of an AIoT-based early flash-flood warning system for smart rural disaster resilience,” Sensors, vol. 26, no. 11, p. 3512, 2026. [Google Scholar] [Crossref]
32.
M. Oliveira, L. Torgo, and V. S. Costa, “Evaluation procedures for forecasting with spatiotemporal data,” Mathematics, vol. 9, no. 6, p. 691, 2021. [Google Scholar] [Crossref]
33.
K. Hirano and J. H. Wright, “Analyzing cross-validation for forecasting with structural instability,” J. Econom., vol. 226, no. 1, pp. 139–154, 2022. [Google Scholar] [Crossref]
34.
A. Amini, M. Dolatshahi, and R. Kerachian, “Effects of automatic hyperparameter tuning on the performance of multi-variate deep learning-based rainfall nowcasting,” Water Resour. Res., vol. 59, no. 1, p. e2022WR032789, 2023. [Google Scholar] [Crossref]
35.
B. Ding, X. Yu, and G. Jia, “Exploring the controlling factors of watershed streamflow variability using hydrological and machine learning models,” Water Resour. Res., vol. 61, no. 5, p. e2024WR039734, 2025. [Google Scholar] [Crossref]
36.
S. M. Lundberg, G. Erion, H. Chen, A. DeGrave, J. M. Prutkin, B. Nair, R. Katz, J. Himmelfarb, N. Bansal, and S. I. Lee, “From local explanations to global understanding with explainable AI for trees,” Nat. Mach. Intell., vol. 2, no. 1, pp. 56–67, 2020. [Google Scholar] [Crossref]
37.
Y. Liu, T. Zhang, A. Kang, J. Li, and X. Lei, “Research on runoff simulations using deep-learning methods,” Sustainability, vol. 13, no. 3, p. 1336, 2021. [Google Scholar] [Crossref]
38.
J. Núñez, C. B. Cortés, and M. A. Yáñez, “Explainable artificial intelligence in hydrology: Interpreting black-box snowmelt-driven streamflow predictions in an arid Andean basin of north-central Chile,” Water, vol. 15, no. 19, p. 3369, 2023. [Google Scholar] [Crossref]
39.
H. Yu, Z. Luo, L. Wang, X. Ding, and S. Wang, “Improving the accuracy of flood susceptibility prediction by combining machine learning models and the expanded flood inventory data,” Remote Sens., vol. 15, no. 14, p. 3601, 2023. [Google Scholar] [Crossref]
40.
S. Liu, Y. Liu, Z. Chu, K. Yang, G. Wang, L. Zhang, and Y. Zhang, “Evaluation of tropical cyclone disaster loss using machine learning algorithms with an eXplainable artificial intelligence approach,” Sustainability, vol. 15, no. 16, p. 12261, 2023. [Google Scholar] [Crossref]
41.
K. Ikeuchi, D. Kakinuma, Y. Nakamura, S. Numata, T. Mochizuki, K. Kubota, M. Yasukawa, T. Nemoto, and T. Koike, “Development of flash flood forecasting system for small and medium-sized rivers,” J. Flood Risk Manag., vol. 18, no. 1, p. e70026, 2025. [Google Scholar] [Crossref]
42.
Y. Liu, H. Wang, X. Lei, and H. Wang, “Real-time forecasting of river water level in urban based on radar rainfall: A case study in Fuzhou City,” J. Hydrol., vol. 603, p. 126820, 2021. [Google Scholar] [Crossref]
Search
Open Access
Research article

A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data

Muhammad Rizal H1*,
Muhajirin1,
Djarot Hindarto2,
Abd Rahman1,
Sitti Suhada3
1
Department of Informatics, Universitas Teknologi Akba Makkassar, 90245 Makassar, Indonesia
2
Department of Informatics, Faculty of Communication Technology and Informatics, Universitas Nasional, 12520 Jakarta, Indonesia
3
Information Technology Education, Universitas Negeri Gorontalo, 96128 Gorontalo, Indonesia
International Journal of Computational Methods and Experimental Measurements
|
Volume 14, Issue 3, 2026
|
Pages 398-419
Received: 08-17-2026,
Revised: 09-08-2026,
Accepted: 09-23-2026,
Available online: 09-30-2026
View Full Article|Download PDF

Abstract:

Flood early-warning systems increasingly use machine learning, but predictive studies rarely assess whether candidate models meet deployment constraints at warning locations. This study evaluated a six-layer, digital-twin-inspired edge artificial intelligence (AI) framework using five years of daily hydro-meteorological observations ($n$ = 1,826) from one river gauge in Indonesia. The framework integrated causal preprocessing, 93 engineered predictors, paired extreme gradient boosting (XGBoost) classification and regression models, a synchronised state-update surrogate for stage–inundation scenarios, and a rule-based alert engine. The alert engine used class-specific probability gates and dispatch de-duplication. Evaluation followed chronological partitions. Imputation statistics and risk thresholds were derived from training data, uncertainty was assessed using a moving-block bootstrap, and paired model comparisons used McNemar and Diebold–Mariano tests (DMs). On the held-out year, the deployed model achieved a macro F1-score of 0.788 (95% confidence interval: 0.721–0.830) and a next-day stage root mean squared error (RMSE) of 0.353 m. Nash–Sutcliffe efficiency was 0.872. Warning-state verification yielded a probability of detection (POD) of 0.945 and a false-alarm ratio (FAR) of 0.101 under the configured policy. XGBoost, random forest, and gradient boosting showed no statistically detectable performance differences in the reported tests, including an eightfold rolling-origin evaluation of 728 pooled test days. Sequence models trained on raw 30-day windows did not improve performance under the evaluated pipelines. However, the tree models used engineered predictors, so the comparison does not isolate architectural effects. The XGBoost classifier was approximately 41 times smaller and 175 times faster at the 99th-percentile inference latency than the random forest. The complete deployed bundle occupied 134 kB and achieved a 99th-percentile latency of 1.39 ms on the benchmark host. These findings support deployment cost as a practical selection consideration when available tests cannot distinguish predictive performance. Generalisation requires multi-station replication, formal equivalence testing where equivalence is claimed, and hardware-in-the-loop validation.

Keywords: Flood early warning, Edge artificial intelligence, Digital-twin-inspired modelling, Extreme gradient boosting, Rolling-origin evaluation, Explainable artificial intelligence, Deployment cost

1. Introduction

Hydro-meteorological hazards affect populations worldwide, and floods account for a substantial proportion of their impacts. Recent reviews document rapid progress from conceptual rainfall–runoff models to sophisticated data-driven forecasting approaches [1]. However, improvements in prediction do not necessarily translate into timely warnings for exposed communities. Warning delivery also depends on infrastructure reliability, processing latency, and confidence in operational decisions.

Two architectural approaches address these operational requirements. Digital twins maintain an updated virtual representation of a physical system and support scenario analysis. Recent implementations have demonstrated this approach at urban [2] and basin [3] scales. Edge artificial intelligence (AI) processes data near sensors, reducing dependence on continuous connectivity when communication infrastructure is disrupted [4], [5]. These approaches have developed largely in parallel. Digital-twin studies often emphasise system architecture without extensively benchmarking embedded prediction models. Conversely, edge-AI studies frequently quantify memory and latency without evaluating warning-related hydrological decisions.

Evaluation practices create a second challenge. Many comparative flood-modelling studies rank algorithms by small differences in reported scores without corresponding paired significance tests. Model rankings also vary across flood-susceptibility settings [6], [7], [8]. Although recurrent neural networks are widely used for hydrological time series [9], [10], broader research shows that tree ensembles remain competitive on moderate-sized tabular datasets [11]. Evidence from data-scarce hydrological applications supports similar caution [12]. Consequently, comparative claims should account for dataset characteristics, statistical uncertainty, and the representations supplied to competing models.

These gaps motivate a practical model-selection question: how should candidates be selected when the available tests do not detect a meaningful performance difference? Selecting the highest observed validation score can overstate small sample-dependent differences. It may also overlook memory and latency constraints on the intended device. This study therefore examined whether deployment cost provides a useful additional selection criterion when paired comparisons do not distinguish leading candidates. Failure to reject a difference is not, by itself, proof of statistical equivalence; the conclusions are consequently limited to the evidence provided by the reported tests and deployment measurements.

The study evaluated an integrated six-layer framework and made five contributions. First, it combined an edge inference engine, a synchronised digital-twin-inspired state surrogate, and rule-based alert dissemination in one evaluated pipeline. The state surrogate was not designed as a geometry-resolved hydraulic digital twin. Second, paired statistical comparisons and eightfold rolling-origin evaluation were used to assess whether leading tree ensembles showed detectable differences. Third, sequence models were evaluated using raw time windows, while tree models used engineered tabular predictors; this was treated as a pipeline-level comparison rather than an architecture-controlled experiment. Fourth, model footprint and inference latency were measured using common benchmark instrumentation. Finally, warning-state skill was distinguished from de-duplicated dispatch counts, because these quantities answer different operational questions.

2. Literature Review

2.1 From Process Representation to Learned Prediction and the Persistence of the Benchmark Problem

Physically based flood models represent hydrological processes explicitly but often require intensive calibration, identifiable parameters, and substantial computational resources. Coupled hydrological–hydraulic systems can produce defensible inundation estimates [13], and integration with ensemble weather predictions improves fine-resolution forecasting [14]. These approaches may nevertheless be difficult to operate in poorly instrumented catchments or settings with limited computing infrastructure.

Data-driven models offer a different balance between representation and operational cost. Gradient-boosted trees have been applied to hourly stage prediction [15] and river-ice processes [16]. A systematic review also documents wider extreme gradient boosting (XGBoost) applications in water resources engineering [17]. Together, these studies illustrate the versatility of tree boosting for hydro-meteorological prediction, although operational costs require separate measurement. XGBoost also includes sparsity-aware split selection and learned default directions for missing inputs [18]. These algorithmic features are distinct from the imputation strategy adopted in this study.

Related work on discharge forecasting has shown that distributed hydrological representations can improve machine-learning predictions for ungauged basins [19]. Deep neural networks have also achieved strong reservoir-stage predictions, although deployment resource requirements were not the focus of that evaluation [20]. Remote-sensing approaches to flood susceptibility provide further examples of predictive modelling without comprehensive operational cost assessment [21]. A remaining issue is the choice of benchmark. Comparisons limited to learned algorithms may not establish whether the proposed predictor improves on a simple persistence forecast. This baseline is especially important for short-horizon stage prediction.

2.2 Digital Twins in Flood Management: Architectural Ambition and Evidential Thinness

Digital-twin approaches are increasingly used in flood management. Geospatial systems support urban-scale flood visualisation [2], while physics-informed graph neural networks have been integrated with basin-scale twin architectures [3]. Other frameworks combine machine learning with physical models for adaptive emergency management [22]. Heterogeneous sensor integration also provides the continuous observations required for synchronised state updates [23].

Despite these advances, the predictive component of a digital-twin framework is not always evaluated with the same detail as its architecture. Headline accuracy alone may not establish a meaningful advantage over simpler models, particularly when uncertainty and execution cost are unreported. This limitation matters because forecasting quality constrains the usefulness of downstream warning decisions. Uncertainty-aware approaches offer one route to more transparent assessment [24].

2.3 Edge Intelligence and the Economics of Inference

Edge-computing research provides established measures for operational efficiency. Reviews of tiny machine learning (TinyML) identify memory use, inference latency, and energy consumption as important deployment metrics [4]. Broader assessments of embedded AI likewise emphasise trade-offs between predictive accuracy and resource requirements [5]. Practical developments include energy-efficient inference on unmanned aerial platforms [25], remote deployment of models to Internet of Things (IoT) devices [26], hardware accelerators for microcontrollers [27], and benchmarks for lightweight neural networks [28].

Flood-monitoring studies have deployed IoT and geographic information system platforms [29], multimodal river sensors [30], and AI-enabled warning systems for rural settings [31]. However, several such studies place greater emphasis on sensing and communication than on the measured memory and latency of predictive models. Reporting both predictive performance and resource cost would make the feasibility of gateway deployment easier to assess across systems.

2.4 Evaluation Practice: Leakage, Statistical Power, and the Unexamined Claim of Superiority

Three evaluation concerns are particularly relevant to comparative forecasting. The first is temporal leakage. Estimating imputation statistics, scaling parameters, or target thresholds on a full dataset can introduce information from future observations into model development. Randomly shuffled cross-validation also disrupts the time order required for forecasting. Methodological analyses of spatiotemporal evaluation [32] and structurally unstable time series [33] support the use of chronologically appropriate validation.

The second concern is statistical precision. A single year of daily testing provides only a few hundred observations, and the effective sample size is further reduced by serial dependence. Small differences between model scores can therefore be unstable. Expanding-window, rolling-origin evaluation adds disjoint test periods and permits paired comparisons across different seasonal conditions. Nevertheless, additional temporal observations do not replace validation at independent stations.

The third concern is hyperparameter tuning. Automated tuning can materially change rainfall–runoff prediction performance [34]. Comparing a carefully tuned proposed model with untuned alternatives would therefore confound algorithmic differences with configuration quality. Streamflow studies also show that model behaviour depends on catchment and climatic conditions [35]. Model comparisons should report these design choices alongside performance metrics.

This study combined chronological evaluation, paired model comparisons, and deployment-cost benchmarking in a single flood-warning pipeline. The analysis focused on the absence or presence of statistically detectable differences, rather than treating small point-estimate gaps as definitive evidence of model superiority.

3. Methodology

3.1 Framework Architecture

Figure 1 shows the six-layer framework. Layer 1 acquired the historical meteorological record and simulated input from a real-time sensor stream. Layer 2 performed data cleaning, causal imputation, and feature construction. Layer 3 contained the edge inference engine: two offline-trained gradient-boosted models packaged as one serialised artefact for gateway-class execution. Layer 4 maintained an operational state based on assimilated observations, predicted stage, a stage–inundation surrogate, and counterfactual scenarios. Here, digital-twin-inspired refers to synchronised state updating and scenario evaluation, not to a surveyed, geometry-resolved hydraulic replica or bidirectional actuator control. Layer 5 stored state information and generated decision-support products. Layer 6 translated model outputs into alerts for dashboards, messaging, short-message services, and sirens. The design allowed prediction skill, model size, latency, and warning verification to be evaluated within the same pipeline.

Figure 1. Six-layer architecture of the digital-twin-inspired edge AI flood early-warning framework
Note: AI = artificial intelligence; XGBoost = extreme gradient boosting; IOT = Internet of Things; BMKG = Indonesian Agency for Meteorology, Climatology and Geophysics.
3.2 Study Record and Data Quality Audit

The study used 1,826 consecutive daily records from 1 January 2018 to 31 December 2022 at one Indonesian meteorological and hydrological station. The measurements were obtained from the Indonesian Agency for Meteorology, Climatology and Geophysics (BMKG). The nine measured variables were river stage, discharge, rainfall, relative humidity, minimum temperature, maximum temperature, mean temperature, wind speed, and wind direction. Table 1 summarises the data-quality audit. Three types of irregularity required explicit handling. Rainfall used the sentinel code 888 during a contiguous 184-day outage from 1 July to 31 December 2019, entirely within the training period. Nine discharge values included estimated or provisional qualifiers; their numeric components were retained, together with qualifier indicators. A rainfall measurement of 499 mm on 15 February 2021 was flagged as unusually high but retained, with its influence moderated by a logarithmic transformation.

Table 1. Data-quality audit for the original daily record

Variable

Missing

Sentinel-Coded

Out of Range

Complete (%)

Mean

SD

Min

Max

Water level (m)

0

0

0

100.0

1.17

1.01

0.00

5.8

Discharge (m$^3$/s)

0

0

0

100.0

13.37

26.83

0.00

201.0

Rainfall (mm)

0

184

1

89.9

12.41

28.17

0.00

499.0

Relative humidity (%)

166

0

0

90.9

79.57

6.48

52.00

96.0

Min. temperature ($^\circ$C)

87

0

0

95.2

25.22

0.98

20.00

29.7

Max. temperature ($^\circ$C)

78

0

0

95.7

32.03

1.51

25.40

35.8

Mean temperature ($^\circ$C)

166

0

0

90.9

28.06

1.09

24.10

33.2

Wind speed (m/s)

30

0

0

98.4

4.61

1.58

0.00

18.0

Wind direction ($^\circ$)

30

0

0

98.4

241.59

80.16

0.00

360.0

Note: $n$ = 1,826; nine measured variables; 1 January 2018–31 December 2022.

Of the 1,826 daily observations, the first 14 days (1–14 January 2018) supplied the historical context required by the maximum 14-day antecedent-rainfall feature window. The final observation (31 December 2022) was unavailable as a modelling input because its next-day target fell outside the record. The remaining 1,811 supervised samples covered 15 January 2018 to 30 December 2022. These samples were partitioned chronologically without shuffling. Model training used 1,082 samples (15 January 2018–31 December 2020), validation and hyperparameter selection used 365 samples (1 January–31 December 2021), and held-out testing used 364 samples (1 January–30 December 2022; Table 2). The High-risk class accounted for approximately 10% of the training observations and 16% of the test observations. This difference in class prevalence was retained as a characteristic of the record.

Table 2. Chronological partitions and stage-based risk-class composition

Partition

Period

Days

Low

Medium

High

High (%)

Mean Stage (m)

Train

2018-01-15–2020-12-31

1,082

752

220

110

10.2

0.967

Val

2021-01-01–2021-12-31

365

185

95

85

23.3

1.457

Test

2022-01-01–2022-12-30

364

165

141

58

15.9

1.437

Note: Partitions were not shuffled. The 14-day feature warm-up and one-day-ahead target explain the removal of 15 endpoint observations. Risk thresholds were estimated using the training partition only ($P_{70}$ = 1.120 m, $P_{90}$ = 2.098 m).

The raw observation count overstates the amount of independent evidence available for model fitting. The 14-day feature warm-up reduced the eligible training interval to 1,082 samples, while serial dependence further reduced its effective information content. All records also came from a single gauge. The resulting estimates describe temporal performance at this station during 2018–2022; they do not establish transferability to other catchments. Rolling-origin evaluation added temporal test periods but did not provide independent spatial observations. The limited record also constrained the data available to train higher-parameter sequence models. External multi-station validation is needed to assess geographic transfer.

3.3 Causal Preprocessing and Leakage-Free Imputation

Missing values were imputed using information available at or before each time step. A day-of-year climatology was estimated from the training partition only. Gaps of up to three days were first forward-filled. Remaining gaps were filled using the training-period climatological median within a $\pm$7-day calendar window, followed by the overall training median when needed. Each imputed input received a binary indicator. This procedure retained information about reconstructed measurements and permitted separate assessment of the 2019 rainfall outage. A perturbation test confirmed that changes to test-year values did not affect fitted climatology or fallback statistics.

Feature causality was evaluated with an additional perturbation test. Multiplying the final 120 observations by an arbitrary constant did not change any feature rows preceding that window. A separate screening rule rejected features with absolute target correlation greater than 0.999; the highest observed correlation was 0.876.

3.4 Feature Construction and Target Definition

The feature set comprised 93 predictors grouped into eight families (Table 3). It included contemporaneous measurements at time $t$, circular encoding of wind direction, and a logarithmic rainfall transform. Historical features comprised one-, two-, three-, five-, and seven-day lags; shifted three- and seven-day rolling statistics; rainfall accumulations over two, three, five, seven, and fourteen days; and wet-day counts. Additional features represented changes in stage and discharge, exponentially decaying antecedent precipitation, humidity-weighted antecedent wetness, seasonal harmonics, and data-quality indicators.

Table 3. Engineered feature families and their marginal contributions
Family$\boldsymbol{n}$Description$\boldsymbol{\Delta}$ Macro F1
Raw13Instantaneous observations at time $t$, circular wind encoding, log rainfall, diurnal range-0.0189
Lag30Lagged values at $t-1$, $t-2$, $t-3$, $t-5$, $t-7$ for six core variables-0.0029
Rolling203- and 7-day rolling mean and standard deviation, shifted to exclude time $t$-0.0021
Cumulative72/3/5/7/14-day antecedent rainfall totals, wet-day counts, 7-day maximum-0.0017
Dynamics7First differences and rates of change of stage and discharge-0.0008
Antecedent2Exponentially decaying antecedent precipitation index ($k$ = 0.85) and humidity-weighted variant-0.0053
Seasonal4Harmonic day-of-year terms, month, monsoon indicator-0.0008
Quality10Per-variable imputation indicators and discharge qualifier flags-0.0053
Note: Predictors used information available at or before time $t$, and the target was observed at $t+1$. The final column shows the change in test-year macro F1 after removing each family.

Two one-day-ahead targets were defined. The regression target was next-day river stage in metres. The classification target divided stage into Low (below the 70th percentile), Medium (70th to below the 90th percentile), and High (at or above the 90th percentile) risk bands. Thresholds were estimated from the training partition only and were 1.120 m and 2.098 m. Perturbing test-year values did not change these thresholds. The bands are statistical categories of stage, not independently documented flood or inundation events. This distinction limits the interpretation of warning performance (Section 9).

The 93 predictors were derived from the underlying observed variables rather than from 93 independent sensors. Removing engineered feature families would mainly reduce historical buffering, feature calculations, and vector serialisation. It would not directly reduce sensor acquisition or radio transmission. Savings from eliminating physical measurement channels would require excluding corresponding raw variables, which was considered separately through feature-family ablation in Section 4.6.

3.5 Model Development, Baselines, and Edge Deployment

The proposed forecasting pipeline combined an XGBoost classifier and regressor [18]. A 60-iteration randomised search with five-fold TimeSeriesSplit cross-validation was conducted within the training partition. Classification settings were selected by macro F1-score, and regression settings by negative root mean squared error (RMSE); Table 4 lists the resulting configurations. Balanced sample weights addressed class imbalance without resampling high-stage observations. Before final testing, the operational models were refitted using the combined training and validation partitions.

Table 4. Selected hyperparameters for the XGBoost classifier and regressor

Model

n_estim.

max_depth

Learn. Rate

Subsample

Colsample

min_child_wt

reg_$\boldsymbol{\lambda}$

XGBoost classifier

200

2

0.02

1.00

0.60

10

5.0

XGBoost regressor

800

5

0.10

0.60

1.00

1

1.0

Note: XGBoost = extreme gradient boosting; n_estim. = number of boosting estimators (trees); max_depth = maximum tree depth; min_child_wt = minimum child weight; reg_$\lambda$ = L2 regularization term on leaf weights. Hyperparameters were selected using 60-iteration randomised search with five-fold TimeSeriesSplit cross-validation within the training partition. Both models used the histogram tree method and seed 42.

Four classification baselines were evaluated: random forest, gradient boosting, decision tree, and multinomial logistic regression. These models used the same engineered feature matrix and sample-weighting scheme. Where a baseline required complete inputs, median imputation was applied within its processing pipeline. Regression comparisons also included ridge regression and a naive persistence forecast. Persistence provided an operationally relevant benchmark for next-day stage prediction.

Three sequence-model baselines were evaluated: a long short-term memory (LSTM) network, a gated recurrent unit (GRU), and a dilated temporal convolutional network (TCN). They used 30-day windows of raw daily observations, whereas the tree models received the engineered 93-feature matrix. These representations differed: cumulative rainfall, rolling statistics, antecedent precipitation, nonlinear transforms, and data-quality indicators were supplied explicitly to the tree models but had to be inferred from raw sequences by the neural models. Scaling statistics and class weights were fitted on training data only, early stopping used the validation year, and each sequence architecture was trained with three seeds. Results were reported as the mean and standard deviation. Thus, the comparison evaluated practical pipelines with different feature engineering, not the isolated effect of model architecture.

The classifier, regressor, ordered feature contract, and risk thresholds were packaged in a single serialised artefact with a single-record prediction interface. Inference latency was measured on the benchmark host over 2,000 randomised single-record calls after warm-up. Model size was measured from the compressed serialised artefact. Identical benchmark procedures were applied to all candidate models.

3.6 Digital-Twin-Inspired State Model, Decision Support and Alert Dissemination

Layer 4 maintained a lightweight operational state rather than a high-fidelity engineering digital twin. It used the deployed predictions and a parameterised trapezoidal channel-and-floodplain relation to estimate relative changes in inundated area and overbank depth. Counterfactual scenarios perturbed rainfall and antecedent-moisture features coherently. The state model did not incorporate surveyed channel geometry, a hydraulic mesh, computer-aided design or building information modelling, bidirectional asset control, or lifecycle tracking. Accordingly, the stage–inundation relation supported comparisons of scenario sensitivity, not calibrated predictions of absolute inundation. Robustness was assessed with simulated Gaussian measurement noise, calibration drift, and Bernoulli packet loss.

The alert engine used class-specific probability thresholds, a persistence setting, and de-duplication. The probability threshold was 0.40 for Medium-risk, 0.35 for High-risk, and 0.00 for Low-risk. Persistence was set to one consecutive prediction; therefore, a single elevated prediction satisfied the persistence condition. These operating parameters were specified heuristically and were not optimised on the held-out 2022 data or derived from an agency cost–loss model. De-duplication prevented repeated dispatches while the same alert level remained active. One dispatch could therefore represent an episode spanning several warning-days. Skill was scored against the warning state rather than against dispatch events, which were reported separately as alert load. Future evaluations should vary the thresholds and persistence settings under explicit agency-defined costs.

3.7 Evaluation Protocol

Classification was evaluated using accuracy, balanced accuracy, macro and weighted F1-scores, Matthews correlation coefficient, quadratically weighted Cohen’s kappa, and macro one-versus-rest areas under receiver-operating characteristic and precision–recall curves. Class-specific measures included probability of detection (POD), false-alarm ratio (FAR), specificity, and critical success index. Regression metrics were RMSE, mean absolute error, coefficient of determination, Nash–Sutcliffe efficiency, Kling–Gupta efficiency, and percentage bias (PBIAS).

Uncertainty was estimated by moving-block bootstrap with 14-day blocks and 1,000 replicates to accommodate serial dependence. Classification predictions were compared using the exact paired McNemar test. Regression forecasts were compared using the Diebold–Mariano test (DM) on squared errors. Rolling-origin evaluation comprised eight expanding-window folds, each with 91 test days beginning on 1 January 2021. Within each fold, thresholds were re-estimated using only the available training data. Model comparisons used a Wilcoxon signed-rank test across valid folds and a pooled McNemar test on concatenated test predictions.

The eight test windows were F1, 1 January–1 April 2021; F2, 2 April–1 July 2021; F3, 2 July–30 September 2021; F4, 1 October–30 December 2021; F5, 31 December 2021–31 March 2022; F6, 1 April–30 June 2022; F7, 1 July–29 September 2022; and F8, 30 September–29 December 2022. F3 and F7 contained fewer than three observed risk classes. Both were retained in the pooled analysis of 728 test days but excluded from fold-level means, standard deviations, and Wilcoxon tests, for which a missing class can distort macro F1. The trajectories of all eight folds are presented in the rolling-origin evaluation results. Including the two restricted-class folds would have increased the XGBoost fold mean from 0.742 to 0.763. The six-fold mean was therefore used for fold-level comparisons.

Model interpretability was assessed using TreeSHapley Additive exPlanations (SHAP) [36] for global and local attribution. These results were compared with permutation importance and split-gain rankings. Leave-one-family-out ablation was used to estimate the marginal contribution of each engineered feature family.

3.8 Reproducibility

A fixed master seed controlled stochastic elements of the tabular-model and simulation pipeline. Sequence models were trained with three seeds, as described in Section 3.5. The core workflow executed the primary preprocessing, tabular modelling, explainability, inference benchmarking, scenarios, and alerting analyses from the raw data. Forty-nine automated assertions checked sentinel handling, qualifier retention, calendar completeness, training-only climatology, feature causality, threshold provenance, metric calculations, artefact round-trip consistency, and alert logic. Execution metadata recorded the computing environment, software versions, selected hyperparameters, principal metrics, and runtime.

4. Results

4.1 The Record and Its Partitions

Figure 2 presents the hydro-meteorological record, chronological data partitions, and the reconstructed period of missing rainfall observations. River stage exhibited seasonal variation, with wetter conditions generally occurring from November to April. During extended dry periods, stage fell below 0.5 m. Figure 3 shows the training-derived risk thresholds and the class distribution across partitions. The High-risk share increased from approximately 10% in training to 16% in testing, while the Low-risk share decreased from about 70% to 45%.

Figure 2. Hydro-meteorological series and chronological partitions: (a) rainfall, showing the reconstructed 2019 instrument-outage period; (b) river stage, with $P_{70}$ and $P_{90}$ thresholds estimated from training data; (c) discharge
Note: Shading identifies training, validation, and test periods.
Figure 3. Stage-based risk-class construction and prevalence: (a) empirical stage distribution and percentile thresholds; (b) class proportions by partition; (c) class counts
4.2 Predictive Performance on the Held-Out Year

Table 5 summarises the deployed classifier’s performance. In the held-out test year, accuracy was 0.8132 (95% confidence interval (CI)): [0.758, 0.876]), macro F1 was 0.7882 (95% CI: [0.721, 0.830]), and Matthews correlation coefficient was 0.7043 (95% CI: [0.618, 0.781]). Macro one-versus-rest ROC-AUC and PR-AUC were 0.9483 and 0.8886, respectively. Macro F1 was higher during validation (0.8553) than testing (0.7882). This difference coincided with the change in class prevalence, although the available results do not isolate its contribution.

Table 5. Classification performance of the deployed model

Metric

Validation (2021)

Test (2022)

95% CI (Test)

Accuracy

0.8822

0.8132

[0.758, 0.876]

Balanced accuracy

0.8583

0.8025

–

Macro F1

0.8553

0.7882

[0.721, 0.830]

Weighted F1

0.8833

0.8163

–

MCC

0.8116

0.7043

[0.618, 0.781]

Quadratically weighted Cohen’s kappa

0.8992

0.8073

–

ROC-AUC (macro one-versus-rest)

0.9659

0.9483

–

PR-AUC (macro)

0.9203

0.8886

–

Note: CI = confidence interval; MCC = matthews correlation coefficient; ROC-AUC = area under the receiver-operating characteristic curve; PR-AUC = area under the precision–recall curve; (–) = not applicable. CIs were estimated by a moving-block bootstrap using 14-day blocks and 1,000 replicates to accommodate serial dependence.

Table 6 shows class-specific performance. Low-risk predictions achieved an F1-score of 0.900 and a FAR of 0.071. Medium-risk predictions were less reliable (F1 = 0.767), reflecting the difficulty of separating adjacent stage bands. For the High-risk class, recall was 0.776 and precision was 0.634. The relative operational costs of missed warnings and false alarms determine whether this balance is acceptable. The confusion matrices in Figure 4 show that no High-risk observation was classified as Low-risk; all High-risk errors involved the adjacent Medium class. The quadratically weighted kappa was 0.807. Figure 5 displays class-wise discrimination curves.

Table 6. Class-specific test-year performance
Risk ClassSupportPrecisionPODF1SpecificityFARCSI
Low1650.9290.8730.9000.9450.0710.818
Medium1410.7750.7590.7670.8610.2250.622
High580.6340.7760.6980.9150.3660.536
Macro average3640.7790.8030.7880.9070.2210.659
Note: POD = probability of detection; FAR = false-alarm ratio; CSI = critical success index.
Figure 4. Confusion matrices for the deployed classifier: (a) validation data; (b) test counts; (c) row-normalised test results
Note: No observed High-risk day was classified as Low-risk.
Figure 5. Test-year one-versus-rest discrimination: (a) receiver-operating characteristic curves; (b) precision–recall curves
Note: AUC = operating characteristic curve; AP = average precision. Dotted lines indicate class prevalence.

For next-day stage prediction, RMSE was 0.3527 m, mean absolute error was 0.2318 m, Nash–Sutcliffe efficiency was 0.8715, Kling–Gupta efficiency was 0.8895, and PBIAS was -0.9243% (Table 7). Figure 6 compares predicted and observed stages and presents residual diagnostics. Residuals were approximately symmetric with limited overall bias. Underestimation was more apparent at the largest observed stages.

Table 7. Next-day river-stage regression performance on the held-out test year

Metric

Value

Interpretation

RMSE (m)

0.3527

26% below the naive persistence forecast (0.475 m)

MAE (m)

0.2318

Typical error $\approx$ 23 cm

$R^2$

0.8715

87% of test-year variance explained

NSE

0.8715

“Very good” by conventional hydrological criteria ($>$0.75)

KGE

0.8895

Correlation, variance and bias jointly satisfactory

PBIAS (%)

-0.9243

Negligible systematic bias

Note: RMSE = root mean squared error; MAE = mean absolute error; NSE = Nash–Sutcliffe efficiency; KGE = Kling–Gupta efficiency; PBIAS = percentage bias.
Figure 6. Test-year river-stage regression diagnostics: (a) observed and predicted hydrographs; (b) predicted versus observed stage; (c) residual distribution; (d) residuals versus observed stage, with binned medians in black
Note: XGBoost = extreme gradient boosting.
4.3 Comparative Analysis: Performance Differences and Deployment Cost

Table 8 compares test-year prediction scores, confidence intervals, paired significance tests, and deployment costs; Figure 7 displays predictive performance. Gradient boosting had the highest observed macro F1 (0.8151), followed by random forest (0.8073) and XGBoost (0.7882). However, exact McNemar tests did not detect significant differences between XGBoost and gradient boosting ($p = 0.185$) or random forest ($p = 0.405$). Confidence intervals also overlapped substantially. The decision tree performed significantly worse than XGBoost ($p = 0.016$). In the regression analysis, DMs found no significant difference between XGBoost and gradient boosting ($p$ = 0.851), random forest ($p$ = 0.460), or ridge regression ($p$ = 0.503). The persistence forecast performed significantly worse (DM = -2.647, $p$ = 0.008). Non-significant results do not establish formal equivalence; they show that the reported tests did not distinguish the candidates at the chosen significance level.

Table 8. Test-year model comparison, paired significance tests, and deployment cost

Model

Accuracy

Macro F1

95% CI (F1)

MCC

ROC-AUC

McNemar $\boldsymbol{p}$

Size (kB)

P99 (ms)

XGBoost (proposed)

0.8132

0.7882

[0.721, 0.830]

0.7043

0.9483

–

60.8

0.74

Random forest

0.8297

0.8073

[0.734, 0.848]

0.7249

0.9393

0.405

2502.6

129.57

Gradient boosting

0.8352

0.8151

[0.747, 0.852]

0.7351

0.9467

0.185

341.4

2.03

Decision tree

0.7610

0.7430

[0.666, 0.792]

0.6312

0.8773

0.016

5.4

0.45

Logistic regression

0.7830

0.7624

[0.690, 0.815]

0.6541

0.9204

0.161

6.0

0.76

Note: CI = confidence interval; MCC = matthews correlation coefficient; ROC-AUC = area under the receiver-operating characteristic curve; XGBoost = extreme gradient boosting; (–) = not applicable. All tabular learners used the same engineered feature matrix and balanced weighting. McNemar $p$-values denote two-sided exact tests against XGBoost.
Figure 7. Test-year model comparison: (a) classification metrics with 95% moving-block bootstrap intervals; (b) regression errors, with Nash–Sutcliffe efficiency shown above each pair
Note: MCC = matthews correlation coefficient; RMSE = root mean squared error; MAE = mean absolute error; NSE = Nash–Sutcliffe efficiency; XGBoost = extreme gradient boosting.

The principal comparative result was that the available tests did not distinguish the three leading tree ensembles despite different point estimates. Their deployment costs differed substantially (Figure 8). The random-forest classifier occupied 2,502.6 kB and required 129.57 ms at the 99th percentile of single-record latency. Gradient boosting occupied 341.4 kB and required 2.03 ms, whereas XGBoost occupied 60.8 kB and required 0.74 ms. The observed macro-F1 spread was 0.027, while the ratio of random-forest to XGBoost cost was approximately 41 for model size and 175 for latency. These resource differences offer a practical selection consideration, subject to the predictive uncertainty and device-specific benchmarks.

Figure 8. Predictive skill and deployment cost: macro F1 versus: (a) 99th-percentile single-record latency; (b) serialised model size
Note: XGBoost = extreme gradient boosting. Both horizontal axes are logarithmic; vertical bars show 95% moving-block bootstrap intervals.
4.4 Sequence-Model Baselines Under Unequal Input Representations

Table 9 and Figure 9 report the sequence-model results. Across three random seeds, macro F1 was 0.7617 $\pm$ 0.0041 for the GRU, 0.75 $\pm$ 0.015 for the LSTM, and 0.7191 $\pm$ 0.0222 for the TCN. Under the evaluated pipelines, none exceeded the engineered-feature XGBoost model. Paired tests found significantly lower classification performance for LSTM (McNemar $p$ = 0.0295) and TCN ($p$ = 0.0008), but not for GRU ($p$ = 0.1848). The LSTM and GRU regression forecasts were not significantly different from XGBoost (DM $p$ = 0.901 and 0.823, respectively), whereas TCN was worse (DM = -3.079, $p$ = 0.002). Because the tree models used engineered tabular features and the sequence models used raw 30-day windows, these results do not isolate the effect of architecture.

Table 9. Sequence-model baselines using the same chronological partitioning
ModelSeedsMacro F1SDRMSE (m)SDSize (kB)p99 (ms)McNemar $\boldsymbol{p}$
XGBoost (proposed)–0.7882–0.3527–60.80.74–
LSTM30.7500$\pm$0.01500.3571$\pm$0.005378.80.470.0295
GRU30.7617$\pm$0.00410.3551$\pm$0.007860.12.220.1848
TCN30.7191$\pm$0.02220.4464$\pm$0.0557205.42.790.0008
Note: XGBoost = extreme gradient boosting; GRU = gated recurrent unit; LSTM = long short-term memory network; TCN = temporal convolutional network; RMSE = root mean squared error; (–) = not applicable. 30-day lookback, validation-year early stopping, and three seeds reported as mean $\pm$ standard deviation. McNemar tests compared predictions against XGBoost on matching test dates.
Figure 9. Tree and sequence-model comparisons: (a) macro F1, with seed-to-seed variability for the sequence models; (b) macro F1 versus serialised model size
Note: XGBoost = extreme gradient boosting; GRU = gated recurrent unit; LSTM = long short-term memory network; TCN = temporal convolutional network.

Deployment measurements provide another basis for comparing these pipelines. GRU model size was similar to that of the XGBoost classifier, at approximately 60 kB, but its inference latency was higher. The TCN was both larger and slower than XGBoost. In this dataset, the sequence pipelines did not show a predictive advantage that justified their measured resource costs. A controlled architecture comparison would require either training XGBoost on raw lagged inputs or supplying equivalent engineered information to the sequence models.

4.5 Rolling-Origin Re-Evaluation

The held-out test year provided a limited basis for assessing small model differences. Rolling-origin evaluation examined whether the absence of significant differences among leading tree ensembles persisted across additional time periods. Eight 91-day expanding-window test folds provided 728 pooled prediction-days. Table 10 and Figure 10 summarise the results.

Table 10. Rolling-origin evaluation across eight 91-day test folds (728 pooled test days)

Model

Macro F1 (Pooled)

MCC (Pooled)

Fold Mean

Fold SD

Wilcoxon $\boldsymbol{p}$

Pooled McNemar $\boldsymbol{p}$

Random Forest

0.8328

0.7643

0.7382

0.1311

0.844

0.3966

XGBoost

0.8225

0.7528

0.7419

0.0859

–

–

Gradient Boosting

0.8159

0.7453

0.7173

0.1215

0.562

1.0000

Logistic Regression

0.7747

0.6937

0.6745

0.1159

0.062

0.0165

Decision Tree

0.7575

0.6593

0.6498

0.0985

0.031

0.0002

Note: MCC = Matthews correlation coefficient; XGBoost = extreme gradient boosting; (–) = not applicable. Fold means, standard deviations, and Wilcoxon statistics exclude F3 and F7 because these folds contain fewer than three observed risk classes. Pooled McNemar testing includes all eight folds.
Figure 10. Rolling-origin evaluation: (a) macro-F1 trajectories across all eight folds, including F3 and F7; (b) between-fold variability for the six folds containing all three classes; (c) pooled performance versus six-fold mean performance
Note: XGBoost = extreme gradient boosting.

Paired tests again did not detect significant differences among the leading ensembles. XGBoost and gradient boosting produced 34 discordant pooled predictions in each direction (McNemar $p$ = 1.000), while the comparison with random forest gave $p$ = 0.3966. Wilcoxon tests across six non-degenerate folds also yielded non-significant results ($p$ = 0.562 and 0.844, respectively). The larger pooled sample detected differences from logistic regression ($p$ = 0.0165) and decision tree ($p$ = 0.0002). These findings strengthen the evidence that large performance differences among the leading ensembles were not detected under this evaluation. They do not constitute a formal equivalence test or establish that the study had sufficient power to exclude all practically relevant differences.

Among the six folds containing all three risk classes (F1, F2, F4, F5, F6, and F8), XGBoost had the lowest between-fold macro-F1 standard deviation (0.0859). The corresponding values were 0.1311 for random forest and 0.1215 for gradient boosting. Lower variability may be desirable across seasonal conditions, although the small number of eligible folds limits precision. The restricted-class dry-season folds, F3 and F7, remained in pooled testing and were displayed in Figure 10a. Including them in the XGBoost fold mean would have raised it from 0.7419 to 0.763.

4.6 Interpretability and Feature Contribution

Global SHAP attribution identified current river stage as the dominant predictor (mean absolute SHAP value = 0.554), followed by discharge (0.185) and same-day rainfall (0.173; Figure 11). Fourteen-day cumulative rainfall contributed more to the Low- and Medium-risk predictions, whereas shorter rainfall accumulations contributed more to High-risk predictions. This pattern is consistent with different temporal relationships between antecedent wetness and rapid stage increases. SHAP values describe model attribution and should not be interpreted as causal evidence of hydrological mechanisms.

Figure 11. TreeSHAP attribution for the deployed classifier: (a) mean absolute SHAP values by feature and risk class; (b) distribution of local SHAP contributions for the High-risk class
Note: SHAP = SHapley Additive exPlanations.

Local attribution was examined for the highest-risk test day, 20 January 2022. The reported contributors were current stage (4.50 m; SHAP +0.456), same-day rainfall (83 mm; +0.353), five-day rainfall (230 mm; +0.171), two-day rainfall (134 mm; +0.153), and discharge (115 m$^3$/s; +0.137). These values provide a model-based explanation that an operator can inspect alongside the observed inputs. The attribution scale and target class should be specified when presenting individual SHAP values in operational interfaces.

The leave-one-family-out ablation is shown in Table 3. Removing raw observations reduced test-year macro F1 by 0.019. Removing antecedent-index or data-quality features reduced it by approximately 0.005 each. Removing lags, rolling statistics, cumulative rainfall, dynamics, or seasonal features reduced macro F1 by 0.003 or less per family. Together, these five lower-marginal-contribution families contained 68 of the 93 predictors (30 lags, 20 rolling features, 7 cumulative features, 7 dynamic features, and 4 seasonal features). Retaining the raw, antecedent, and quality families would yield a candidate 25-feature input contract, a 73% reduction in feature count. With scalar float32 storage, this would reduce the input-vector width from 372 to 100 bytes per record; with float64 storage, the corresponding values are 744 and 200 bytes. These figures exclude metadata and temporal buffers. However, individual ablation effects are not additive. The candidate input contract has not been jointly retrained or validated, and no proportional reduction in model size or end-to-end latency can be inferred. Because derived features use the same physical measurements, potential savings primarily concern buffering, computation, and serialisation rather than sensor acquisition.

4.7 Edge Inference Performance

Table 11 and Figure 12 summarise inference performance of the complete deployed bundle. The classifier, regressor, feature contract, and risk thresholds occupied 134.3 kB. Across 2,000 single-record measurements, median latency was 0.92 ms, 95th-percentile latency was 1.15 ms, and 99th-percentile latency was 1.39 ms. The maximum observed latency was 5.99 ms. All 364 operational time steps met the one-second service objective, corresponding to approximately 720-fold headroom at the 99th percentile on the benchmark host. Batched inference required an average of 0.008 ms per record at batch size 364. This batching measurement excluded sensor acquisition, historical buffering, feature construction, and communication overhead.

Table 11. Measured inference performance of the complete deployed artefact, comprising classifier, regressor, feature contract, and thresholds

Quantity

Value

Serialised artefact size

134.3 kB

Mean latency

0.957 ms

Median latency

0.916 ms

95th-percentile latency

1.146 ms

99th-percentile latency

1.389 ms

Maximum observed latency

5.991 ms

Time steps within the 1 s objective

100.0%

Headroom against the 1 s objective

720$\times$

Amortised latency at batch = 364

0.008 ms per record

Note: 2,000 randomised single-record calls after warm-up.
Figure 12. Inference performance: (a) distribution of 2,000 single-record latency measurements; (b) amortised latency by batch size; (c) 99th-percentile latency relative to the one-second objective
4.8 Operational Simulation and Warning Verification

Figure 13 shows the simulated operational state through the test year, including observed and predicted stage, risk classifications, active warning periods, and dispatch events. Under the probability thresholds and one-step persistence setting described in Section 3.6, the warning-state contingency table contained 188 hits, 11 misses, 21 false alarms, and 144 correct negatives (Table 12). Probability of detection was 0.945, false-alarm ratio was 0.101, critical success index was 0.855, and Heidke skill score was 0.822. The classifier produced 138 Medium-risk and 71 High-risk prediction-days, totalling 209 elevated prediction-days. Every elevated prediction passed its class-specific probability threshold, and the one-step persistence setting imposed no additional filtering. Thus, these settings did not reduce active warning-days in the simulation. De-duplication reduced 209 warning-days to 66 distinct dispatches, equivalent to an alert load of 18.1% of test days. The observed dispatch reduction was attributable to de-duplication, not to probability gating or persistence filtering.

Figure 13. Test-year operational state simulation: (a) observed and predicted stage with active-warning intervals and dispatch markers; (b) predicted and observed risk classes; (c) predicted class probabilities
Table 12. Test-year warning verification

Quantity

Value

Quantity

Value

Hits

188

POD

0.9447

False alarms

21

FAR

0.1005

Misses

11

CSI

0.8545

Correct negatives

144

HSS

0.8217

Days with a warning in effect

209

POFD

0.1273

Distinct dispatches

66

Alert load (% of days)

18.1%

Note: POD = probability of detection; FAR = false-alarm ratio; CSI = critical success index; HSS = Heidke skill score; POFD = probability of false detection. Skill was evaluated for the active warning state after probability gating and the configured one-step persistence rule. De-duplicated dispatch counts were reported separately as alert load.
4.9 Robustness to Lead Time, Telemetry Degradation and Scenario Perturbation

Table 13 reports sensitivity to forecast lead time and simulated telemetry degradation. At one-, two-, and three-day horizons, macro F1 decreased from 0.788 to 0.685 and 0.631, respectively. Nash–Sutcliffe efficiency decreased from 0.872 to 0.585 and 0.423. Performance was strongest at the one-day horizon. The longer-horizon results reflected the constraints of daily observations and the absence of forecast meteorological forcing.

Table 13. Sensitivity of the deployed model to forecast horizon and simulated IoT telemetry degradation (test year 2022)

Condition

Macro F1

Accuracy

RMSE (m)

NSE

Forecast Lead Time

$t+1$ day

0.7882

0.8132

0.352

0.8715

$t+2$ days

0.6854

0.7245

0.6338

0.5847

$t+3$ days

0.6313

0.6657

0.7476

0.4225

Telemetry Quality at $\boldsymbol{t+1}$

Clean (BMKG)

0.7882

0.8132

0.3527

0.8715

Nominal IoT (1$\times$ noise, 2% dropout)

0.7793

0.8049

0.3552

0.8697

Degraded IoT (2$\times$ noise, 8% dropout)

0.7641

0.7912

0.4052

0.8304

Severe IoT (4$\times$ noise, 15% dropout)

0.7655

0.7857

0.3816

0.8496

Note: IOT = Internet of Things; RMSE = root mean squared error; NSE = Nash–Sutcliffe efficiency; BMKG = Indonesian Agency for Meteorology, Climatology and Geophysics.

Performance was less sensitive to the simulated telemetry disturbances. Under nominal noise and 2% packet loss, macro F1 decreased by 0.009. With fourfold noise and 15% packet loss, the reduction relative to clean data was approximately 0.023. Nash–Sutcliffe efficiency remained above 0.83 in the evaluated disturbance settings. Multi-day feature aggregation may explain part of this robustness, but the simulation does not establish performance under real field failures.

Table 14 shows the counterfactual scenario outputs. Its High-risk percentage refers to model-predicted days: 71 of the 364 test-day predictions were High (19.5%) at baseline. By contrast, Table 2 reports 58 observed High-risk days (15.9%). Doubling rainfall increased the proportion of High-risk days from 19.5% to 30.2% and increased the surrogate-estimated mean inundated area by 79% relative to baseline. The compound scenario, which combined 50% higher rainfall, wetter antecedent conditions, and a 0.2 m stage offset, produced the largest median stage response. Because the stage–inundation relation was not hydraulically calibrated, these values represent relative scenario sensitivities rather than absolute inundation forecasts.

Table 14. Test-year counterfactual scenarios

Scenario

Median Stage (m)

P95 Stage (m)

Mean Area (ha)

$\boldsymbol{\Delta}$ Area (%)

Model-Predicted High-Risk Days (%)

S0 Baseline

1.223

3.162

42.0

+0.0

19.5

S1 Rainfall +25%

1.228

3.729

51.7

+23.0

23.4

S2 Rainfall +50%

1.268

4.053

61.1

+45.4

26.6

S3 Rainfall +100%

1.282

4.274

75.2

+79.1

30.2

S4 Wet antecedent

1.227

3.160

41.8

-0.4

19.5

S5 Extreme compound

1.389

4.034

65.5

+55.9

28.6

S6 Dry antecedent

1.184

2.813

32.1

-23.7

15.7

Note: The results of this table are with High-risk percentages calculated from model predictions rather than the observed stage-based risk classes. Rainfall and antecedent-derived features were perturbed consistently. Inundated area was calculated using a parameterised stage–area surrogate and represents relative sensitivity, not an absolute inundation forecast.

5. Discussion

Interpretation is limited to the single gauge and the observed 2018–2022 hydro-meteorological regime. The rolling-origin analysis provided additional within-station evaluation periods but not spatial validation. Accordingly, predictive comparisons, feature-attribution patterns, and deployment measurements should be interpreted in this specific data and hardware context until independently replicated.

5.1 Interpreting Non-Significant Model Differences for Selection

The leading tree ensembles had different observed macro-F1 scores, but the reported paired tests did not identify significant differences among them. This finding illustrates the need to separate numerical rankings from inferential conclusions. Small differences in a single test sample may not be reliable enough to justify a deployment choice. The rolling-origin analysis added temporal test periods and detected significant differences for some simpler baselines. Nevertheless, non-significant tests should not be described as demonstrating statistical equivalence without a prespecified equivalence margin and an appropriate equivalence-testing procedure.

When available evidence does not clearly distinguish candidate models on predictive performance, deployment cost can inform selection alongside uncertainty and operational requirements. In this study, XGBoost required approximately 41 times less storage and had approximately 175 times lower 99th-percentile inference latency than random forest on the benchmark host. These measured differences were much larger in relative terms than the observed differences in macro F1. Consequently, selecting the highest point estimate without considering computational requirements would overlook a substantial resource trade-off. The proposed cost-based criterion remains conditional on this dataset, the benchmark configuration, and the range of predictive differences that the evaluation could detect.

5.2 Interpreting the Sequence-Model Comparison Under Unequal Feature Engineering

Under the evaluated input representations, the LSTM, GRU, and TCN pipelines did not outperform the engineered-feature XGBoost pipeline. This finding is consistent with evidence of strong tree-ensemble performance on moderate-sized tabular datasets [11] and in data-scarce hydrological settings [12]. However, approximately 1,050 training sequences were available to the deep models, and the input representations differed. The tree models received engineered rainfall accumulations, rolling features, antecedent indices, and quality flags, whereas the sequence models used raw time windows. Earlier research on runoff simulation also examined deep-learning model components and inputs [37]. Therefore, the observed performance differences cannot be attributed to architecture alone. They support a pipeline-specific comparison under the available record and feature representations.

Two implications follow. First, repeated training seeds are important because sequence-model variability reached a standard deviation of 0.022 macro F1 for the TCN. Second, future comparisons should control input representation. For example, researchers could compare raw-lagged XGBoost with sequence models or provide comparable engineered summaries to both model families. Such experiments would be needed before drawing general conclusions about relative architectural performance.

5.3 Interpretability as an Operational Instrument Rather Than a Compliance Exercise

Explainable AI has been applied to streamflow modelling [38], flood susceptibility [39], and disaster-loss estimation [40]. In the present study, feature attribution differentiated contributions from longer antecedent rainfall histories and short-duration accumulations. These patterns were hydrologically interpretable, but attribution methods alone cannot establish that a model has learned physical causation rather than statistical associations. Their primary contribution is to make model behaviour more transparent and open to domain-specific scrutiny.

Local attributions can also support operational review. Presenting important model inputs and their contributions allows an operator to examine the basis of an elevated-risk prediction. Such explanations may improve documentation when warning decisions are later reviewed, provided that the reported attribution scale and uncertainty are clear. Feature-family ablation also suggested opportunities to simplify historical buffering and feature computation. Because engineered features were calculated from the same measured variables, this potential simplification does not imply an equivalent reduction in physical sensors.

5.4 Verification of Warning States and Dispatch Events

Warning verification depended on the operating policy specified in Section 3.6. The observed probability of detection was 0.945 and the false-alarm ratio was 0.101. Medium- and High-risk probability thresholds (0.40 and 0.35) were heuristic settings, not thresholds selected by a formal cost–loss analysis. All 209 elevated predictions exceeded their corresponding thresholds in the 2022 replay, and one-step persistence imposed no further filtering. Therefore, the operationally relevant observed counts were 11 missed event-days, 21 false-alarm days, and 66 de-duplicated dispatches. Different thresholds or longer persistence rules may change these outcomes and should be tested against agency-defined costs and warning priorities.

Warning states and dispatch events serve different purposes. A warning may remain active for several days even though only one notification is dispatched for the episode. Scoring the 66 de-duplicated dispatches against all elevated days yielded a POD of 0.291, whereas scoring the active warning state yielded 0.945 on the same predictions. The latter represents day-level warning coverage; the former does not measure whether a warning remained active. Operational studies should therefore state the verification unit explicitly when reporting detection metrics.

5.5 Scope of Generalisation, Non-Stationarity and the Limits of a Single-Gauge Record

Spatial coverage is the main constraint on generalisation. The study provides repeated temporal evidence from one gauge but no independent evidence for catchments with different rainfall regimes, channel geometry, land cover, or response times. The resulting model rankings, threshold settings, and deployment trade-offs may differ at other stations. External holdout gauges are therefore required before extending the findings beyond the observed catchment. The record also exhibited a change in class prevalence: High-risk days increased from about 10% during training to 16% during testing. This shift coincided with lower test-year performance, although the analysis did not isolate its causal contribution. Across rolling-origin folds, the 70th-percentile threshold increased from 1.120 m to 1.330 m. These observations motivate monitoring and reassessing stage-band thresholds over time rather than assuming they remain fixed [35].

Five years of observations from one gauge cannot reliably separate long-term non-stationarity from interannual variability. Rolling-origin evaluation assessed temporal robustness within the observed period but did not identify the physical drivers of the shift. Longer records are needed to characterise temporal drift, and independent gauges are needed to assess spatial transfer. The two requirements address different sources of uncertainty. For the distinct problem of short-response hazards, recent small-river flash-flood forecasting [41] and urban water-level prediction using radar rainfall [42] illustrate potential directions for improved temporal resolution.

6. Conclusion

This study evaluated a six-layer, digital-twin-inspired edge-AI pipeline for one-day-ahead flood-risk stage bands and river-stage prediction at a single Indonesian gauge. On the held-out test year, the model achieved a macro F1-score of 0.788 and Nash–Sutcliffe efficiency of 0.872. Warning-state verification gave a probability of detection of 0.945 and a false-alarm ratio of 0.101. The complete model bundle occupied approximately 134 kB and achieved a 99th-percentile inference latency of 1.39 ms on the benchmark host. The synchronised state layer supported relative scenario assessment but was not a geometry-resolved hydraulic digital twin.

XGBoost, gradient boosting, and random forest showed no statistically detectable differences in the reported paired comparisons, including the 728-day rolling-origin evaluation. This finding does not establish formal equivalence. Sequence models trained on raw 30-day windows did not demonstrate a performance advantage under the evaluated input representations, but their comparison with engineered-feature trees was not architecture controlled. Deployment cost differed much more substantially among the leading ensembles than their observed predictive scores. The findings therefore support considering model footprint and latency when selecting among candidates whose predictive differences remain unresolved. Replication across stations, representation-matched modelling, and benchmarking on target hardware are necessary before broader operational recommendations can be made.

Two methodological findings also affect the interpretation of warning systems. First, warning-state verification and dispatch-event counting produced different detection statistics because de-duplication reduced notifications without reducing the duration of active warnings. Second, including folds that lacked an observed risk class would have raised the fold-mean macro F1 by 0.021. Explicitly defining the verification unit and checking class composition across evaluation folds can therefore prevent misleading performance summaries.

7. Theoretical Implications

The study highlights an inferential distinction in comparative hydrological machine learning. A model with the highest observed score in one sample is not necessarily demonstrably better than its competitors. Paired testing across multiple disjoint forecast origins can assess whether observed differences are detectable under the evaluation design. However, absence of statistical significance does not define a formal equivalence class without an equivalence margin and a suitable test. Model-selection conclusions should therefore report uncertainty and recognise the distinction between non-detection of a difference and evidence that a difference is sufficiently small.

A second implication concerns the role of computational cost in model selection. Memory and inference latency are often evaluated only after predictive modelling. Here, they provided additional discriminating information because the available tests did not distinguish several leading candidates by predictive skill. This supports joint reporting of predictive uncertainty and execution cost in applied hydrology, consistent with established edge-computing evaluation practices. The relative importance of these criteria depends on the target hardware and operational context.

A third implication concerns comparisons between sequence models and tree ensembles. The sequence architectures did not outperform the engineered-feature XGBoost pipeline on the available record. Because the input representations were different, this result is evidence about the evaluated pipelines rather than the inherent superiority of one architecture. Future studies should jointly consider data volume, feature engineering, and model complexity when designing controlled comparisons.

8. Practical Implications

For resource-constrained flood-warning systems, the results suggest that a compact XGBoost classifier may be a practical option when tested alternatives offer no clear predictive advantage. The complete bundle occupied 134.3 kB and achieved inference latency well below the one-second objective on the benchmark host. These findings indicate technical plausibility, not validated field performance or a universal model-procurement rule. Target-hardware benchmarking remains necessary.

The warning engine also illustrates why alert-policy components should be assessed separately. In the replay, probability thresholds passed all 209 elevated predictions, and one-step persistence did not smooth warnings across days. De-duplication reduced those warning-days to 66 notifications. Warning-state verification yielded a POD of 0.945 and a FAR of 0.101. Agencies should therefore evaluate gating, persistence, and notification frequency independently, using sensitivity analysis and context-specific cost–loss assumptions before deployment.

Interpretability may assist operational decision-making when model inputs and attributions are presented with clear units and uncertainty. Such information can help operators review and document warning decisions. Its usability and effect on decisions, however, were not directly evaluated in this study. Operator-facing interfaces should therefore be assessed in future field trials.

The observed change in stage-band prevalence also indicates a need for monitoring. The 70th-percentile threshold changed by 0.21 m across the reported fold-level recalculations. Operational implementations should track the distribution of stage observations and review thresholds periodically, with any updates assessed against actual flood-event records and agency requirements.

9. Limitations and Future Research

Five principal limitations constrain interpretation and identify priorities for further evaluation.

First, the dataset covered five years at a single gauge. Although rolling-origin testing expanded the pooled temporal sample to 728 days, it did not provide independent spatial evidence. Model comparisons, feature contributions, risk thresholds, and resource trade-offs may differ across hydrological conditions. External validation using geographically independent gauges is therefore required before broader generalisation.

Second, the classification targets were percentile-based river-stage categories rather than observed flood events. No independent inundation or incident register was available. The reported classification and warning scores therefore evaluate stage-band prediction, not verified flood occurrence. Linking gauge records with independently documented flood incidents is an important next step.

Third, inference latency was measured on a benchmark host rather than on the intended field gateway. Telemetry disturbances were simulated using noise, calibration drift, and packet loss. The resource and robustness measurements therefore support feasibility but do not demonstrate performance in operational conditions. Hardware-in-the-loop tests should include sensor acquisition, feature construction, and communication on the target device. Established embedded-inference benchmarking approaches provide useful guidance.

Fourth, the digital-twin-inspired layer used a parameterised trapezoidal stage–inundation relation and synthetic vulnerability weights. It supported synchronised state updates and relative scenario comparison, but did not include surveyed geometry, bidirectional physical coupling, or lifecycle asset representation. Its inundation outputs should therefore not be interpreted as calibrated geographic extents. Future work could integrate surveyed cross-sections, elevation data, and hydraulic modelling, as demonstrated in related digital-twin research.

Fifth, the daily observation interval limited the temporal resolution of warnings. In rapidly responding catchments, relevant flood processes may unfold within hours. Performance also decreased at horizons beyond one day. Sub-daily telemetry and forecast meteorological forcing could improve the usefulness of future warning systems. Related flash-flood forecasting and radar-rainfall-driven water-level prediction studies provide potential directions for further evaluation.

Two additional research needs follow. Energy per inference was not measured and should be included when assessing battery- or solar-powered field devices. Multi-catchment replication should also evaluate whether predictive rankings and deployment trade-offs remain stable across hydrological regimes. If formal statistical equivalence is of interest, future studies should prespecify a practically meaningful equivalence margin and use an appropriate equivalence-testing design.

Author Contributions

Conceptualization, M.R.H.; methodology, M.R.H.; software, M.R.H.; validation, M.; formal analysis, M.; writing—original draft preparation, D.H.; writing—review and editing, A.R. and S.S. All authors have read and agreed to the published version of the manuscript.

Funding

This work is funded by the Ministry of Higher Education, Science, and Technology of the Republic of Indonesia (Grant number: 136/C3/DT.05.00/PL-MULTITAHUN LANJUTAN/2026).

Data Availability

The daily hydro-meteorological record analysed in this study was obtained from the Indonesian Agency for Meteorology, Climatology and Geophysics (BMKG). Derived datasets, trained model artefacts, the core analysis pipeline, and scripts supporting preprocessing, tabular modelling, explainability, edge benchmarking, scenario analysis, and alerting are available from the corresponding author upon reasonable request.

Acknowledgements

The authors acknowledge funding from the Ministry of Higher Education, Science, and Technology of the Republic of Indonesia.

Conflicts of Interest

The authors declare no conflicts of interest.

Declaration on the Use of Generative AI and AI-assisted Technologies

During manuscript preparation, ChatGPT was used to assist with language editing and organisation. The authors reviewed and revised the resulting text and retain full responsibility for the accuracy and integrity of the manuscript.

References
1.
N. Byaruhanga, D. Kibirige, S. Gokool, and G. Mkhonta, “Evolution of flood prediction and forecasting models for flood early warning systems: A scoping review,” Water, vol. 16, no. 13, p. 1763, 2024. [Google Scholar] [Crossref]
2.
D. Mandal, L. Zou, A. Wadhwa, R. S. Wilkho, Z. Cai, B. Zhou, X. Ye, G. Newman, N. Gharaibeh, and B. Güneralp, “FlowsDT: A geospatial digital twin for navigating urban flood dynamics,” Comput. Environ. Urban Syst., vol. 126, p. 102414, 2026. [Google Scholar] [Crossref]
3.
R. Chen, S. Li, J. Liu, and B. Deng, “Integrated real-time mapping and forecasting of flood inundation in large-scale digital twins basins based on physics-informed graph neural network,” Eng. Rep., vol. 8, no. 5, p. e70798, 2026. [Google Scholar] [Crossref]
4.
Y. Abadade, A. Temouden, H. Bamoumen, N. Benamar, Y. Chtouki, and A. S. Hafid, “A comprehensive survey on TinyML,” IEEE Access, vol. 11, pp. 96892–96922, 2023. [Google Scholar] [Crossref]
5.
Z. Zhang and J. Li, “A review of artificial intelligence in embedded systems,” Micromachines, vol. 14, no. 5, p. 897, 2023. [Google Scholar] [Crossref]
6.
K. Plataridis and Z. Mallios, “Flood susceptibility mapping using hybrid models optimized with artificial bee colony,” J. Hydrol., vol. 624, p. 129961, 2023. [Google Scholar] [Crossref]
7.
A. Yaseen, J. Lu, and X. Chen, “Flood susceptibility mapping in an arid region of Pakistan through ensemble machine learning model,” Stoch. Environ. Res. Risk Assess., vol. 36, no. 10, pp. 3041–3061, 2022. [Google Scholar] [Crossref]
8.
C. Singha, K. C. Swain, M. Meliho, H. G. Abdo, H. Almohamad, and M. Al-Mutiry, “Spatial analysis of flood hazard zoning map using novel hybrid machine learning technique in Assam, India,” Remote Sens., vol. 14, no. 24, p. 6229, 2022. [Google Scholar] [Crossref]
9.
M. Waqas and U. W. Humphries, “A critical review of RNN and LSTM variants in hydrological time series predictions,” MethodsX, vol. 13, p. 102946, 2024. [Google Scholar] [Crossref]
10.
L. Fang and D. Shao, “Application of long short-term memory (LSTM) on the prediction of rainfall-runoff in Karst area,” Front. Phys., vol. 9, p. 790687, 2022. [Google Scholar] [Crossref]
11.
V. Borisov, T. Leemann, K. Seßler, J. Haug, M. Pawelczyk, and G. Kasneci, “Deep neural networks and tabular data: A survey,” IEEE Trans. Neural Netw. Learn. Syst., vol. 35, no. 6, pp. 7499–7519, 2024. [Google Scholar] [Crossref]
12.
Z. Gaffoor, K. Pietersen, N. Z. Jovanovic, A. Bagula, T. Kanyerere, O. Ajayi, and G. Wanangwa, “A comparison of ensemble and deep learning algorithms to model groundwater levels in a data-scarce aquifer of Southern Africa,” Hydrology, vol. 9, no. 7, p. 125, 2022. [Google Scholar] [Crossref]
13.
G. V. Rao, N. R. Nagireddy, V. R. Keesara, and V. Sridhar, “Real-time flood forecasting using an integrated hydrologic and hydraulic model for the Vamsadhara and Nagavali basins, Eastern India,” Nat. Hazards, vol. 120, no. 7, pp. 6011–6039, 2024. [Google Scholar] [Crossref]
14.
G. Varlas, A. Papadopoulos, G. Papaioannou, V. Markogianni, A. Alamanos, and E. Dimitriou, “Integrating ensemble weather predictions in a hydrologic-hydraulic modelling system for fine-resolution flood forecasting: The case of Skala Bridge at Evrotas River, Greece,” Atmosphere, vol. 15, no. 1, p. 120, 2024. [Google Scholar] [Crossref]
15.
D. H. Nguyen, X. H. Le, J. Y. Heo, and D. H. Bae, “Development of an extreme gradient boosting model integrated with evolutionary algorithms for hourly water level prediction,” IEEE Access, vol. 9, pp. 125853–125867, 2021. [Google Scholar] [Crossref]
16.
R. Graf, T. Kolerski, and S. Zhu, “Predicting ice phenomena in a river using the artificial neural network and extreme gradient boosting,” Resources, vol. 11, no. 2, p. 12, 2022. [Google Scholar] [Crossref]
17.
M. Niazkar, A. Menapace, B. Brentan, R. Piraei, D. Jimenez, P. Dhawan, and M. Righetti, “Applications of XGBoost in water resources engineering: A systematic literature review (Dec 2018–May 2023),” Environ. Model. Softw., vol. 174, p. 105971, 2024. [Google Scholar] [Crossref]
18.
T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 2016, pp. 785–794. [Google Scholar] [Crossref]
19.
A. Muhebwa, C. J. Gleason, D. Feng, and J. Taneja, “Improving discharge predictions in ungauged basins: Harnessing the power of disaggregated data modeling and machine learning,” Water Resour. Res., vol. 60, no. 9, p. e2024WR037122, 2024. [Google Scholar] [Crossref]
20.
S. C. Ibañez, C. V. G. Dajac, M. P. Liponhay, E. F. T. Legara, J. M. H. Esteban, and C. P. Monterola, “Forecasting reservoir water levels using deep neural networks: A case study of Angat Dam in the Philippines,” Water, vol. 14, no. 1, p. 34, 2022. [Google Scholar] [Crossref]
21.
S. Hitouri, M. Mohajane, M. Lahsaini, S. A. Ali, T. A. Setargie, G. Tripathi, P. D’Antonio, S. K. Singh, and A. Varasano, “Flood susceptibility mapping using SAR data and machine learning algorithms in a small watershed in northwestern Morocco,” Remote Sens., vol. 16, no. 5, p. 858, 2024. [Google Scholar] [Crossref]
22.
J. Huang, L. Li, and Z. Li, “Integrated flood risk early warning for adaptive emergency management: The IFloPhy framework coupling machine learning and physical models,” Risk Anal., vol. 45, no. 12, pp. 4672–4690, 2025. [Google Scholar] [Crossref]
23.
J. H. Hong and Y. T. Shi, “Integration of heterogeneous sensor systems for disaster responses in smart cities: Flooding as an example,” ISPRS Int. J. Geo-Inf., vol. 12, no. 7, p. 279, 2023. [Google Scholar] [Crossref]
24.
J. A. J. P. Soares, A. K. S. Soares, L. F. Satolo, G. B. Scofield, S. Stephany, and L. B. L. Santos, “Uncertainty-aware machine learning models for flash flood prediction,” Trans. GIS, vol. 30, no. 2, p. e70254, 2026. [Google Scholar] [Crossref]
25.
W. Raza, A. Osman, F. Ferrini, and F. De Natale, “Energy-efficient inference on the edge exploiting TinyML capabilities for UAVs,” Drones, vol. 5, no. 4, p. 127, 2021. [Google Scholar] [Crossref]
26.
B. Sudharsan, J. G. Breslin, M. Tahir, M. I. Ali, O. Rana, S. Dustdar, and R. Ranjan, “OTA-TinyML: Over the air deployment of TinyML models and execution on IoT devices,” IEEE Internet Comput., vol. 26, no. 3, pp. 69–78, 2022. [Google Scholar] [Crossref]
27.
E. Manor and S. Greenberg, “Custom hardware inference accelerator for TensorFlow Lite for microcontrollers,” IEEE Access, vol. 10, pp. 73484–73493, 2022. [Google Scholar] [Crossref]
28.
V. M. Fridous, A. Agarwal, K. B. Bhaskar, V. Nandagopal, and N. Sivakamasundari, “Optimization and benchmarking of lightweight neural networks for efficient embedded AI deployment,” Eng. Rep., vol. 8, no. 5, p. e70814, 2026. [Google Scholar] [Crossref]
29.
S. Choosumrong, K. Piyathamrongchai, R. Hataitara, U. Soteyome, N. Konkong, R. Chalongsuppunyoo, V. Raghavan, and T. Nemoto, “Development of an IoT-based flood monitoring system integrated with GIS for lowland agricultural areas,” Sensors, vol. 25, no. 17, p. 5477, 2025. [Google Scholar] [Crossref]
30.
L. Mdegela, Y. De Bock, E. Municio, E. Luhanga, J. Leo, and E. Mannens, “A multi-modal wireless sensor system for river monitoring: A case for Kikuletwa River floods in Tanzania,” Sensors, vol. 23, no. 8, p. 4055, 2023. [Google Scholar] [Crossref]
31.
V. Wiangnak, M. Wiboonrat, and S. Duangsuwan, “Development of an AIoT-based early flash-flood warning system for smart rural disaster resilience,” Sensors, vol. 26, no. 11, p. 3512, 2026. [Google Scholar] [Crossref]
32.
M. Oliveira, L. Torgo, and V. S. Costa, “Evaluation procedures for forecasting with spatiotemporal data,” Mathematics, vol. 9, no. 6, p. 691, 2021. [Google Scholar] [Crossref]
33.
K. Hirano and J. H. Wright, “Analyzing cross-validation for forecasting with structural instability,” J. Econom., vol. 226, no. 1, pp. 139–154, 2022. [Google Scholar] [Crossref]
34.
A. Amini, M. Dolatshahi, and R. Kerachian, “Effects of automatic hyperparameter tuning on the performance of multi-variate deep learning-based rainfall nowcasting,” Water Resour. Res., vol. 59, no. 1, p. e2022WR032789, 2023. [Google Scholar] [Crossref]
35.
B. Ding, X. Yu, and G. Jia, “Exploring the controlling factors of watershed streamflow variability using hydrological and machine learning models,” Water Resour. Res., vol. 61, no. 5, p. e2024WR039734, 2025. [Google Scholar] [Crossref]
36.
S. M. Lundberg, G. Erion, H. Chen, A. DeGrave, J. M. Prutkin, B. Nair, R. Katz, J. Himmelfarb, N. Bansal, and S. I. Lee, “From local explanations to global understanding with explainable AI for trees,” Nat. Mach. Intell., vol. 2, no. 1, pp. 56–67, 2020. [Google Scholar] [Crossref]
37.
Y. Liu, T. Zhang, A. Kang, J. Li, and X. Lei, “Research on runoff simulations using deep-learning methods,” Sustainability, vol. 13, no. 3, p. 1336, 2021. [Google Scholar] [Crossref]
38.
J. Núñez, C. B. Cortés, and M. A. Yáñez, “Explainable artificial intelligence in hydrology: Interpreting black-box snowmelt-driven streamflow predictions in an arid Andean basin of north-central Chile,” Water, vol. 15, no. 19, p. 3369, 2023. [Google Scholar] [Crossref]
39.
H. Yu, Z. Luo, L. Wang, X. Ding, and S. Wang, “Improving the accuracy of flood susceptibility prediction by combining machine learning models and the expanded flood inventory data,” Remote Sens., vol. 15, no. 14, p. 3601, 2023. [Google Scholar] [Crossref]
40.
S. Liu, Y. Liu, Z. Chu, K. Yang, G. Wang, L. Zhang, and Y. Zhang, “Evaluation of tropical cyclone disaster loss using machine learning algorithms with an eXplainable artificial intelligence approach,” Sustainability, vol. 15, no. 16, p. 12261, 2023. [Google Scholar] [Crossref]
41.
K. Ikeuchi, D. Kakinuma, Y. Nakamura, S. Numata, T. Mochizuki, K. Kubota, M. Yasukawa, T. Nemoto, and T. Koike, “Development of flash flood forecasting system for small and medium-sized rivers,” J. Flood Risk Manag., vol. 18, no. 1, p. e70026, 2025. [Google Scholar] [Crossref]
42.
Y. Liu, H. Wang, X. Lei, and H. Wang, “Real-time forecasting of river water level in urban based on radar rainfall: A case study in Fuzhou City,” J. Hydrol., vol. 603, p. 126820, 2021. [Google Scholar] [Crossref]
Nomenclature

AI

Artificial intelligence

API

Antecedent precipitation index

CSI

Critical success index

DM

Diebold–Mariano test

EWS

Early-warning system

FAR

False-alarm ratio

GRU

Gated recurrent unit

HSS

Heidke skill score

IoT

Internet of Things

KGE

Kling–Gupta efficiency

LSTM

Long short-term memory network

MAE

Mean absolute error (m)

MCC

Matthews correlation coefficient

NSE

Nash–Sutcliffe efficiency

PBIAS

Percentage bias

POD

Probability of detection

POFD

Probability of false detection

PR-AUC

Area under the precision–recall curve

RMSE

Root mean squared error (m)

ROC-AUC

Area under the receiver-operating characteristic curve

SHAP

SHapley Additive exPlanations

TCN

Temporal convolutional network

XAI

Explainable artificial intelligence

XGBoost

Extreme gradient boosting


Cite this:
APA Style
IEEE Style
BibTex Style
MLA Style
Chicago Style
GB-T-7714-2015
H, M. R., Muhajirin, Hindarto, D., Rahman, A., & Suhada, S. (2026). A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data. Int. J. Comput. Methods Exp. Meas., 14(3), 398-419. https://doi.org/10.56578/ijcmem140305
M. R. H, Muhajirin, D. Hindarto, A. Rahman, and S. Suhada, "A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data," Int. J. Comput. Methods Exp. Meas., vol. 14, no. 3, pp. 398-419, 2026. https://doi.org/10.56578/ijcmem140305
@research-article{H2026ADT,
title={A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data},
author={Muhammad Rizal H and Muhajirin and Djarot Hindarto and Abd Rahman and Sitti Suhada},
journal={International Journal of Computational Methods and Experimental Measurements},
year={2026},
page={398-419},
doi={https://doi.org/10.56578/ijcmem140305}
}
Muhammad Rizal H, et al. "A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data." International Journal of Computational Methods and Experimental Measurements, v 14, pp 398-419. doi: https://doi.org/10.56578/ijcmem140305
Muhammad Rizal H, Muhajirin, Djarot Hindarto, Abd Rahman and Sitti Suhada. "A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data." International Journal of Computational Methods and Experimental Measurements, 14, (2026): 398-419. doi: https://doi.org/10.56578/ijcmem140305
H M R, MUHAJIRIN, HINDARTO D, et al. A Digital Twin Inspired Edge AI Framework for Real-Time Flood Early Warning Using XGBoost and IoT Sensor Data[J]. International Journal of Computational Methods and Experimental Measurements, 2026, 14(3): 398-419. https://doi.org/10.56578/ijcmem140305
cc
©2026 by the author(s). Published by Acadlore Publishing Services Limited, Hong Kong. This article is available for free download and can be reused and cited, provided that the original published version is credited, under the CC BY 4.0 license.