Skip to main content

Feature - Significant Wave Height Forecasting GitHub last commit GitHub issues GitHub stars Python Version License

A rich documentation is available in the GitHub repository.

edRFT: Deep Random Vector Functional Link Transformer Network

edRFT is a Python package for significant wave height forecasting using shallow and ensemble deep Random Vector Functional Link Transformer Network models with multiple output layers.

The package is developed for nonlinear time-series forecasting, ocean wave prediction, and regression problems where fast training, strong representation learning, and reliable forecast generation are important.

edRFT combines randomized neural feature mapping, transformer-inspired feature extraction, and efficient regularized output-layer learning.

This package provides two primary implementations:

  • RFTRegressor: A randomized transformer-based forecasting model that converts input variables into nonlinear hidden representations and learns the output layer efficiently using regularized regression.
  • EDRFTRegressor: A deeper ensemble model that stacks randomized transformer layers and uses multiple output layers. Different layers can capture different levels of information, and their predictions are combined to improve forecasting stability.

Key Features

  • RFT and edRFT Models: Provides both a shallow randomized transformer model and a deeper ensemble version.
  • Multiple Output Layers: edRFT learns layer-wise output readouts.
  • Transformer-Inspired Feature Interaction: Helps capture nonlinear relationships among input variables.
  • Efficient Training: Uses randomized hidden representations with regularized output-layer learning.
  • Wave Forecasting: Designed for buoy-based significant wave height forecasting.
  • Forecasting Utilities: Includes lag-window creation, scaling, chronological splitting, evaluation, and experiment helpers.
  • Hyperparameter Tuning: Supports Hyperopt/TPE-based search.

Installation

Downloading locally and installing:

git clone https://github.com/statsdl/edRFT.git
cd edRFT

Install dependencies:

pip install -r requirements.txt

Install the package:

pip install -e .

Using pip install from GitHub:

pip install git+https://github.com/statsdl/edRFT.git

Using pip install from PyPI:

pip install edrft

Development installation:

pip install -e ".[dev]"

Usage

1. RFTRegressor

import numpy as np
from edrft import RFTRegressor

rng = np.random.default_rng(0)
X_train = rng.normal(size=(150, 6))
y_train = X_train[:, 0] - 0.3 * X_train[:, 1] + np.sin(X_train[:, 2])

model = RFTRegressor(n_hidden=64, random_state=0)
model.fit(X_train, y_train)

X_test = rng.normal(size=(20, 6))
y_pred = model.predict(X_test)
print("Predictions:", y_pred)

2. EDRFTRegressor

import numpy as np
from edrft import EDRFTRegressor, make_forecasting_frame

series = np.sin(np.linspace(0, 16, 240))
X, y = make_forecasting_frame(series, order=4, horizon=1)

X_train, y_train = X[:180], y[:180]
X_test = X[180:]

model = EDRFTRegressor(
    n_layers=3,
    n_hidden=32,
    regularization=1e-3,
    random_state=0,
)
model.fit(X_train, y_train)

y_pred = model.predict(X_test)
print("Forecasts:", y_pred[:5])

Wave Forecasting Example

python examples/run_wave_forecasting.py \
    --data-dir wave \
    --stations 46001h \
    --years 2017 \
    --look-back 48 \
    --horizon 4 \
    --layers 10 \
    --max-evals 100

The workflow reports RMSE, MAPE, MASE, timing information, and selected hyperparameters.

API Reference

RFTRegressor

A randomized transformer-based regressor for regression and forecasting tasks.

Parameters

  • n_hidden (int): Number of hidden randomized features.
  • regularization (float): Ridge regularization parameter.
  • random_state (int): Random seed for reproducibility.

Methods

  • fit(X, y): Fits the model.
  • predict(X): Predicts output values.

EDRFTRegressor

A deep ensemble randomized transformer model with multiple output layers.

Parameters

  • n_layers (int): Number of stacked randomized transformer layers.
  • n_hidden (int): Number of hidden features per layer.
  • regularization (float): Ridge regularization parameter.
  • aggregation (str): Strategy for combining layer-wise predictions.
  • random_state (int): Random seed for reproducibility.

Methods

  • fit(X, y): Fits the ensemble model.
  • predict(X): Generates final forecasts.

Dataset Details

Variable Description
WDIR Wind direction
WSPD Wind speed
GST Gust speed
APD Average wave period
WVHT Significant wave height

License

This project is licensed under the MIT License. See the LICENSE file for details.

Citation

If you use this package in your research, please cite:

@article{bhambu2025deep,
  title={Deep random vector functional link transformer network with multiple output layers for significant wave height forecasting},
  author={Bhambu, Aryan and Gao, Ruobin and Suganthan, Ponnuthurai Nagaratnam and Selvaraju, Natarajan},
  journal={Applied Soft Computing},
  pages={114136},
  year={2025},
  publisher={Elsevier}
}

Metadata

Release files for edrft 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edrft 0.1.6
File Size Uploaded
edrft-0.1.6.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edrft 0.1.6
File Interpreter ABI Platform
edrft-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / edrft-0.1.6.tar.gz

Download URL edrft-0.1.6.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1cfb24448abe041b33fc738a71fd1ecb6423d55a7abd3e680c87190c27d93adb
BLAKE2b-256 checksum
How to use checksums
8f9585be937192d57079939c946c1e5f64d2c89dc3b2dd7807a9aed1c695009c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release files / edrft-0.1.6-py3-none-any.whl

Download URL edrft-0.1.6-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff1933b4ce4b0469dabec41acd819e436425212b93267a744a2fd446e8dd09e9
BLAKE2b-256 checksum
How to use checksums
09b4973d677241e42a26fccda4e5c60661ef7bc06bc24c618a626293bcb93912
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page