ESN

Contents

ESN#

class xesn.ESN(n_input, n_output, n_reservoir, leak_rate, tikhonov_parameter, input_kwargs=None, adjacency_kwargs=None, bias_kwargs=None)#

A classic ESN architecture, as introduced by Jaeger [2001], with no distribution or parallelism. It is assumed that all data used with this architecture can fit into memory.

Assumptions

  1. For all data provided to ESN methods, time axis is last and it is named “time”

Parameters:
  • n_input (int) – size of the input vector to the ESN in state space

  • n_output (int) – size of the ESN output vector in state space

  • n_reservoir (int) – size of the reservoir or hidden state

  • leak_rate (float) – fraction of current hidden state to use during timestepping, (1-leak_rate) r(n-1) is propagated forward

  • tikhonov_parameter (float) – regularization parameter to prevent overfitting

  • input_kwargs (dict, optional) – the options to specify Win, use boolean option "is_sparse" to determine if RandomMatrix or SparseRandomMatrix is used, then all other options are passed to either of those classes, see their description for available options noting that n_rows and n_cols are not necessary.

  • adjacency_kwargs (dict, optional) – the options to specify W, use boolean option "is_sparse" to determine if RandomMatrix or SparseRandomMatrix is used, then all other options are passed to either of those classes, see their description for available options noting that n_rows and n_cols are not necessary.

  • bias_kwargs (dict, optional) – the options to specifying bias_vector generation. Only "distribution", "factor", and "random_seed" options are allowed.

Methods

ESN.build()

Generate the random adjacency and input weight matrices with sparsity determined by sparsity attribute, scaled by spectral_radius and sigma parameters, respectively.

ESN.predict(y, n_steps, n_spinup)

Use the ESN to make a prediction

ESN.test(y, n_steps, n_spinup)

Make a prediction to be compared to a truth.

ESN.to_xds()

Return object as xarray.Dataset

ESN.train(u[, y, n_spinup, batch_size])

Learn the readout matrix weights through ridge regression.

Attributes

ESN.W

ESN.Win

ESN.Wout

ESN.n_input

ESN.n_output

ESN.n_reservoir

ESN.leak_rate

ESN.tikhonov_parameter

ESN.bias_vector

ESN.input_kwargs

ESN.adjacency_kwargs

ESN.bias_kwargs

ESN.adjacency_factor

ESN.bias_factor

ESN.input_factor