Instrument-grade reservoir-computing forecasters. Deterministic, tiny, fast.
Project description
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 inputs0.2— ESN with input standardization and residual readout0.3—resvoir_ml.forecast()top-level convenience that auto-picks a config from signal shape0.4—resvoir_ml.metricsmodule (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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resvoir_ml-0.1.0.tar.gz.
File metadata
- Download URL: resvoir_ml-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2b711e1a93a5d53475b0ea0b67053901da9a750834a480453d23dbacefa90bb
|
|
| MD5 |
00f84d75c0e52282dbea3aca32502337
|
|
| BLAKE2b-256 |
53c7a5ecafd183c5c4e3bff7dc65382f64236bac517cd489fd996909a097d5a8
|
File details
Details for the file resvoir_ml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: resvoir_ml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf04d1c49ba9422f89fef856f8ceafff2da5b73c399038e0c94c7738fa35af8e
|
|
| MD5 |
2a3ac01a8f1c300d43f37d23f1098f98
|
|
| BLAKE2b-256 |
92f9b3f703d8cd25a65a4facf0ef76fb8a6821d8e0b5fb4bcddb7b845bd6b325
|