xesn.ESN.predict

Contents

xesn.ESN.predict#

ESN.predict(y, n_steps, n_spinup)#

Use the ESN to make a prediction

Note

This creates a new ftime dimension, indicating the time since prediction initial conditions (forecast time). The ftime vector is created by subtraction: y["time"].values - y["time"].values[n_spinup]. If y["time"] is filled with floats, it is recommended to add the attribute: y["time"].attrs["delta_t"] indicating the finest increment to round ftime to. Otherwise, floating point arithmetic will make this vector have crazy values.

Parameters:
  • y (xarray.DataArray) – the input data driving the reservoir during spinup, must have “time” as the last dimension, and it needs to have at least n_spinup entries in time

  • n_steps (int) – number of prediction steps to take

  • n_spinup (int) – number of spinup steps before making the prediction

Returns:

xpred (xarray.DataArray) – the prediction, with no spinup data and length n_steps+1 along the newly created ftime dimension, created by differencing each timestamp and time at prediction initial conditions