Skip to content

alliander-opensource/s4casting

S4Casting

S4Casting is a forecasting toolkit built around several deep learning models:

  • State Space Models (SSMs) such as S4 and selective SSMs (a.k.a. S6 / Mamba-style models)
  • Transformer variants

It is designed for medium voltage power forecasting tasks, including:

  • Short-term forecasting – covering time horizons of days, typically used for forecasts up to 2 days ahead.

The repo contains:

  • Training loop (distributed / torchrun-ready)
  • Evaluation and benchmarking pipeline
  • Config-driven experiments (CPU / CUDA configs)
  • Inference scripts for running trained models on new data

Installation

You can install the repo following the installation guide:

Documentation

You can find detailed documentation for each component in the following links:

Example Notebooks

You can find example notebooks in the notebooks/ directory, demonstrating how to use the S4Casting toolkit for forecasting tasks.

LF Energy OpenSTEF Support

Future s4casting models will be integrated into the LF Energy OpenSTEF project in the near future. OpenSTEF provides reusable, automated machine‑learning pipelines for generating accurate and explainable short‑term grid load forecasts (up to 48 hours ahead). By integrating s4casting models into OpenSTEF, we can leverage shared infrastructure, align on common data and ML patterns, and reduce model‑specific complexity. At the same time, this integration expands the set of available forecasting models within OpenSTEF, improving overall maintainability, consistency, and reuse across implementations.

License

This project is licensed under the Mozilla Public License, version 2.0 - see LICENSE for details.

Licenses third-party libraries

This project includes third-party libraries, which are licensed under their own respective Open-Source licenses. SPDX-License-Identifier headers are used to show which license is applicable. The concerning license files can be found in the LICENSES directory.

Contributing

Please read CODE_OF_CONDUCT, CONTRIBUTING, GOVERNANCE and RELEASE for details on the process for submitting pull requests to us.

Citation

For citing our work please see CITATION.

Contact

Please read SUPPORT for how to connect and get into contact with the S4Casting project.

About

S4Casting is a forecasting toolkit built around several deep learning models

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors