Machine learning and analysis code with combined BEWARE 2 and Coral reef profiles for wave-runup prediction datasets
This dataset contains the data and code used to develop and evaluate a machine-learning approach for analysing coastal wave runup. The dataset includes a combined and randomised dataset derived from the BEWARE 2 and Coral reef profiles for wave-runup prediction datasets, together with the scripts required for machine-learning testing and subsequent results analysis.
The accompanying code includes 1_Testing_MLP.py, which implements the multilayer perceptron (MLP) testing workflow, and 2_Results_Analysis.py, which processes and analyses the resulting model outputs.
The dataset also includes the normalisation scales used for the training data.
Cite this dataset as:
Thompson, L.,
2026.
Machine learning and analysis code with combined BEWARE 2 and Coral reef profiles for wave-runup prediction datasets.
Bath: University of Bath Research Data Archive.
Available from: https://doi.org/10.15125/BATH-01725.
Export
Data
BEWARE_combined … domised.parquet
application/octet-stream (802MB)
Creative Commons: Attribution 4.0
Combined and randomised BEWARE dataset prepared for machine learning analysis. The file contains the processed observations and associated variables combined into a single dataset and randomly ordered prior to splitting into training and testing data. This dataset was used as the input for the multilayer perceptron (MLP) modelling workflow.
normalisation … training_only.csv
text/csv (232B)
Creative Commons: Attribution 4.0
Normalisation scaling values calculated from the training dataset only, used to normalise input variables prior to machine-learning model training and testing.
requirements.txt
text/plain (61B)
Creative Commons: Attribution 4.0
Lists the Python package dependencies required to run the MLP training and results analysis scripts. Dependencies can be installed using pip install -r requirements.txt.
Code
1_Testing_MLP.py
text/plain (23kB)
Creative Commons: Attribution 4.0
Python script used to train and test a multilayer perceptron (MLP) model. The script loads the prepared BEWARE dataset, applies normalisation using scaling parameters calculated from the training data only, trains the MLP, and evaluates model performance on the withheld test data.
2_Results_Analysis.py
text/plain (10kB)
Creative Commons: Attribution 4.0
Python script used to analyse and visualise the results of the multilayer perceptron (MLP) experiments. The script processes model predictions and performance outputs, calculates relevant evaluation metrics, and generates analyses and visualisations for comparing predicted and observed values.
Creators
Laura Thompson
University of Bath
Contributors
Samuel Rose
Supervisor
University of Bath
Chris Blenkinsopp
Supervisor
University of Bath; University of New South Wales
University of Bath
Rights Holder
Documentation
Data collection method:
This dataset was created by combining data from the BEWARE 2 and Coral reef profiles for wave-runup prediction datasets. The combined dataset was prepared for use in machine-learning experiments investigating coastal runup. The accompanying Python code was developed to test a multilayer perceptron (MLP) model and analyse the resulting model outputs.
Data processing and preparation activities:
The source datasets were combined into a single dataset and randomised prior to use in the machine-learning workflow. Normalisation scales were calculated using the training data only and are provided in normalisation_scales_training_only.csv. The processed combined dataset is provided as BEWARE_combined_randomised.parquet. The accompanying Python scripts perform the MLP testing and subsequent analysis of the model results.
Technical details and requirements:
The machine-learning workflow is implemented in Python using PyTorch. The MLP training pipeline uses NumPy, pandas, PyTorch, scikit-learn and Optuna, while the accompanying results analysis uses NumPy, pandas, Matplotlib, scikit-learn and SciPy. Required dependencies are provided in requirements.txt and can be installed using pip install -r requirements.txt. The MLP training script is run separately for each cross-validation fold using the --fold command-line argument.
Additional information:
The dataset and accompanying code are organised to support reproduction of the machine-learning workflow. BEWARE_combined_randomised.parquet contains the combined and randomised BEWARE and Scott et al. data used for model development and testing. normalisation_scales_training_only.csv contains the normalisation parameters derived from the training data and used to scale the input variables without introducing information from the test data. 1_Testing_MLP.py contains the MLP training and cross-validation workflow, and 2_Results_Analysis.py contains the scripts used to analyse model outputs and generate the reported results. The code is written in Python and uses PyTorch for the MLP implementation.
Funders
University of Bath
https://doi.org/10.13039/501100000835
Publication details
Publication date: 30 September 2026
by: University of Bath
Version: 1
DOI: https://doi.org/10.15125/BATH-01725
URL for this record: https://researchdata.bath.ac.uk/1725
Related datasets and code
Scott, F., Antolinez, J. A., McCall, R. T., Storlazzi, C. D., Reniers, A., and Pearson, S., 2020. Coral reef profiles for wave-runup prediction. U.S. Geological Survey. Available from: https://doi.org/10.5066/P9C39WNE.
Philip T McCall, Curt D. Storlazzi, Floortje E. Roelvink, Stuart G. Pearson, Roel Goede, and Jose A. Antolinez, 2024. BEWARE2 database: A meta-process model to assess wave-driven flooding hazards on morphologically diverse, coral reef-lined coasts. U.S. Geological Survey. Available from: https://doi.org/10.5066/P16VX5EP.
Contact information
Please contact the Research Data Service in the first instance for all matters concerning this item.
Contact person: Laura Thompson
Faculty of Engineering & Design
Architecture & Civil Engineering
Chemical Engineering
Research Centres & Institutes
Centre for Climate Adaptation & Environment Research (CAER)