xesn.ESN.train

Contents

xesn.ESN.train#

ESN.train(u, y=None, n_spinup=0, batch_size=None)#

Learn the readout matrix weights through ridge regression.

Parameters:
  • u (xarray.DataArray) – input data driving the ESN, with “time” as the last dimension

  • y (xarray.DataArray, optional) – target or label data for training, if different from the input data

  • n_spinup (int, optional) – number of spinup steps for the ESN, not included in training

  • batch_size (int, optional) – used to perform training in batches, but note that all time data are still loaded into memory regardless of this parameter

Sets Attributes:

Wout (array_like) – (n_ouput, n_reservoir) the readout matrix, mapping from reservoir to output space