https://github.com/ahaeusser/echos
Echo State Networks for Time Series Forecasting
https://github.com/ahaeusser/echos
echo-state-networks fable fabletools forecast forecasting recurrent-neural-networks reservoir-computing ridge-regression time-series
Last synced: 4 months ago
JSON representation
Echo State Networks for Time Series Forecasting
- Host: GitHub
- URL: https://github.com/ahaeusser/echos
- Owner: ahaeusser
- Created: 2020-03-20T08:53:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-01-26T12:29:45.000Z (5 months ago)
- Last Synced: 2026-01-26T23:58:27.692Z (5 months ago)
- Topics: echo-state-networks, fable, fabletools, forecast, forecasting, recurrent-neural-networks, reservoir-computing, ridge-regression, time-series
- Language: R
- Homepage: https://ahaeusser.github.io/echos/
- Size: 29.5 MB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
dev = "svg",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# echos 
[](https://cran.r-project.org/package=echos)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
[](https://app.codecov.io/gh/ahaeusser/echos?branch=master)
[](https://github.com/ahaeusser/echos/actions/workflows/R-CMD-check.yaml)


The `echos` package provides a comprehensive set of **functions and methods** for modeling and forecasting univariate time series using **Echo State Networks (ESNs)**. It offers two alternative approaches:
* **Base R interface:** Functions for modeling and forecasting time series using `numeric` vectors, allowing for straightforward integration with existing R workflows.
* **Tidy interface:** A seamless integration with the [`fable`](https://github.com/tidyverts/fable) framework based on [`tsibble`](https://github.com/tidyverts/tsibble), enabling tidy time series forecasting and model evaluation. This interface leverages the [`fabletools`](https://github.com/tidyverts/fabletools) package, providing a consistent and streamlined workflow for model development, evaluation, and visualization.
The package features a **lightweight implementation** that enables **fast and fully automatic** model training and forecasting using ESNs. You can quickly and easily build accurate ESN models without requiring extensive hyperparameter tuning or manual configuration.
## Installation
You can install the **stable** version from [CRAN](https://cran.r-project.org/package=echos):
``` r
install.packages("echos")
```
You can install the **development** version from [GitHub](https://github.com/):
``` r
# install.packages("devtools")
devtools::install_github("ahaeusser/echos")
```
## Base R
```{r base, message = FALSE, warning = FALSE, fig.alt = "Plot forecast and test data"}
library(echos)
# Forecast horizon
n_ahead <- 12 # forecast horizon
# Number of observations
n_obs <- length(AirPassengers)
# Number of observations for training
n_train <- n_obs - n_ahead
# Prepare train and test data
xtrain <- AirPassengers[(1:n_train)]
xtest <- AirPassengers[((n_train+1):n_obs)]
# Train and forecast ESN model
xmodel <- train_esn(y = xtrain)
xfcst <- forecast_esn(xmodel, n_ahead = n_ahead)
# Plot result
plot(xfcst, test = xtest)
```
## Tidy R
```{r tidy, message = FALSE, warning = FALSE, fig.alt = "Plot forecast and train data"}
library(echos)
library(tidyverse)
library(tsibble)
library(fable)
# Prepare train data
train_frame <- m4_data %>%
filter(series %in% c("M21655", "M2717"))
# Train and forecast ESN model
train_frame %>%
model(
"ESN" = ESN(value),
"ARIMA" = ARIMA(value)
) %>%
forecast(h = 18) %>%
autoplot(train_frame, level = NULL)
```
## References
- Häußer, A. (2026). *Echo State Networks for Time Series Forecasting: Hyperparameter Sweep and Benchmarking.* arXiv preprint arXiv:2602.03912.
- Jaeger, H. (2001). *The “echo state” approach to analysing and training recurrent neural networks* (with an erratum note). Bonn, Germany: German National Research Center for Information Technology (GMD), Technical Report 148(34):13.
- Jaeger, H. (2002). *Tutorial on training recurrent neural networks, covering BPPT, RTRL, EKF and the "echo state network" approach.*
- Lukosevicius, M. (2012). *A practical guide to applying echo state networks.* In *Neural Networks: Tricks of the Trade* (2nd ed.), pp. 659–686. Springer.
- Lukosevicius, M., & Jaeger, H. (2009). *Reservoir computing approaches to recurrent neural network training.* *Computer Science Review*, 3(3), 127–149.