Skip to main content

resvoir-ml

Instrument-grade reservoir-computing forecasters. Deterministic. Tiny. Fast.

pip install resvoir-ml
import numpy as np
from resvoir_ml import NVAR

series = np.sin(np.linspace(0, 20, 500))
model = NVAR().fit(series)
preds = model.predict(horizon=50)

That's the whole surface. No model zoo, no hyperparameter wizard, no pretraining. Eighty-four parameters on Lorenz-63. Trains in 0.1 seconds. Forecasts 1,500 steps in under 50 ms.

Why

Reservoir computing — specifically NVAR (Gauthier et al. 2021) — wins a specific wedge of the forecasting landscape that bigger methods can't reach:

  • Temporal, nonlinear, sometimes chaotic dynamics
  • Small-to-medium training data (200 to 20,000 samples)
  • Latency-critical or parameter-critical inference

See the benchmark for the evidence: NVAR wins 19 of 21 cells against LightGBM, Transformer, TimesFM zero-shot, and a classical ARIMA baseline across Lorenz-63, Mackey-Glass, and Lorenz-96.

API

from resvoir_ml import NVAR

# Accepts numpy arrays, pandas Series, and pandas DataFrames.
# 1D or 2D. Channels in columns.
model = NVAR(k=2, s=1, p=2, ridge=2.5e-6).fit(training_series)

# Default: continues from the end of the training series.
preds = model.predict(horizon=100)

# Or supply your own warm-start history.
preds = model.predict(horizon=100, history=latest_window)

# Persistence.
model.save("forecaster.rvr")
from resvoir_ml import Forecaster
loaded = Forecaster.load("forecaster.rvr")

How this relates to existing RC libraries

reservoir-computing by Bianchi is an ESN-focused library with a strong classification and clustering emphasis. It is an excellent academic reference.

resvoir-ml is different in three ways:

  • NVAR as the primary model, not ESN. NVAR has no random matrices — it is fully deterministic, has fewer parameters, and typically outperforms ESN on low-dimensional chaos.
  • Forecasting-first API. Classification is not the primary use case.
  • Companion products. This library is the open core of the Resvoir project, which also ships a hosted streaming API and an edge-compile target (NVAR → C header for MCU deployment).

Roadmap

  • 0.1 (now) — NVAR, save / load, numpy + pandas inputs
  • 0.2 — ESN with input standardization and residual readout
  • 0.3 — resvoir_ml.forecast() top-level convenience that auto-picks a config from signal shape
  • 0.4 — resvoir_ml.metrics module (valid prediction horizon, NRMSE per step)

License

MIT. See LICENSE.

Citation

If you use this library in research, please cite the benchmark:

Belden, Z. Resvoir Chaos Benchmark: Reservoir Computing vs Deep and Foundation Models. 2026. https://github.com/beldez01/Resvoir

And the underlying NVAR paper:

Gauthier, D. J., Bollt, E., Griffith, A., & Barbosa, W. A. S. (2021). Next generation reservoir computing. Nature Communications, 12, 5564.

Metadata

Release files for resvoir-ml 0.1.0

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

Source distribution (sdist)

Source distribution for resvoir-ml 0.1.0
File Size Uploaded
resvoir_ml-0.1.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for resvoir-ml 0.1.0
File Interpreter ABI Platform
resvoir_ml-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / resvoir_ml-0.1.0.tar.gz

Download URL resvoir_ml-0.1.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e2b711e1a93a5d53475b0ea0b67053901da9a750834a480453d23dbacefa90bb
BLAKE2b-256 checksum
How to use checksums
53c7a5ecafd183c5c4e3bff7dc65382f64236bac517cd489fd996909a097d5a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / resvoir_ml-0.1.0-py3-none-any.whl

Download URL resvoir_ml-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf04d1c49ba9422f89fef856f8ceafff2da5b73c399038e0c94c7738fa35af8e
BLAKE2b-256 checksum
How to use checksums
92f9b3f703d8cd25a65a4facf0ef76fb8a6821d8e0b5fb4bcddb7b845bd6b325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

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