water-4490968 reproducibility package
Year: 2026
Type: software
Abstract: This is the complete code and results package for the manuscript "Machine-Learning Classification of Elevated Discharge in the Koksu River Basin, Kazakhstan: Benchmarking against Persistence and Illustrative DEM-Based Inundation Scenarios" (MDPI Water, water-4490968). It contains all scripts, configurations, and result files required to reproduce the key results reported in the manuscript (Tables 4–5, Figures 2–6).Structure1. Complete Folder Path DescriptionREADME.md Overview and quick guide for reproductionENVIRONMENT.md Operating system, hardware, exact execution order, information on package versionsrequirements.txt Exact Python package versions for pip (the actual, locked environment used)environment.yml The same package versions in Conda formatconfig.json Final model hyperparameters (= Table 3 in the manuscript), random seed, classification thresholdscripts/01_build_features.py Creates the feature dataset from raw station data (runoff, rainfall, temperature)scripts/02_train_models.py Trains Random Forest and XGBoost, calculates persistence baseline → Table 4scripts/03_train_lstm_multiseed.py Trains LSTM over 15 random seeds for robustness testing scripts/04_bootstrap_ci.py Calculates block bootstrap confidence intervals for all models scripts/05_permutation_importance.py Calculates permutation-based feature importance (Table 6 / Section 4.4) scripts/06_gumbel_gev_uncertainty.py Statistical fit of the Gumbel/GEV distribution for Q10/Q25/Q100 with uncertainties scripts/07_hydraulic_connectivity.py Calculates DEM-based flood scenarios including hydraulic connectivity testing (Figure 6) data/annual_maxima.npy 32 annual discharge maxima (1994–2025) for the extreme value statistic data/chronological_split_indices.csv Assigns each day to training/validation/testing period predictions/*.npy Raw model predictions (probabilities/classes) per approach, from the final locked environment predictions/table4_point_estimates.json Summarised key figures (CSI, confusion matrix) for Random Forest, XGBoost, persistence predictions/lstm_multiseed_results.json Results of all 15 LSTM runs (CSI, POD, FAR, ROC-AUC per seed) predictions/inundation_connectivity_results.json Naive vs. hydraulically connected floodplains (basis for Figure 6) 2. What is deliberately NOT included ● Raw Kazhydromet station data (discharge, precipitation, temperature) — obtained directly from Kazhydromet, see Data Availability Statement in the manuscript. ● Raw SRTM elevation model (DEM) and river/catchment shapefiles — publicly available from NASA/USGS SRTM sources. This data is not included due to licensing/distribution restrictions, but is required for Step 1 (feature creation) and Step 7 (flood analysis) if you want to start from scratch. 3. How to work with it — step by step Step 1 — Set up the environment: pip install -r requirements.txt --break-system-packages (or alternatively: conda env create -f environment.yml && conda activate koksu-repro) Step 2 — Directly verify the results (without recalculation): The files in predictions/ already contain the final, verified results. You can open them directly and compare them with the manuscript tables without recalculating anything — e.g. For example, using Python: `json.load(open('predictions/table4_point_estimates.json'))` or `numpy.load('predictions/xgboost_test_probabilities.npy'). Step 3 — Recalculate everything from scratch (optional, requires raw data):Run the scripts in the order specified in ENVIRONMENT.md (01 to 07). Each script reads config.json for all parameters — no manual input is necessary. Results are automatically written to predictions/. 5. Important Note Regarding Version Accuracy All results were generated using the exact package version specified in requirements.txt/environment.yml (including XGBoost 3.3.0, as also mentioned in the manuscript, section 2.10). An earlier version of this package mistakenly used a newer XGBoost version (3.4.1), which resulted in slightly different figures. We identified and corrected this error, and it is fully resolved in the current version—the files presented here correspond exactly to the final values reported in the manuscript.
Language: English
Subfield: Environmental Engineering
Field: Environmental Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7204666269
