xesn.ESN.test

Contents

xesn.ESN.test#

ESN.test(y, n_steps, n_spinup)#

Make a prediction to be compared to a truth. The only difference with predict() is that this returns a dataset with both the prediction and truth.

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:

xds (xarray.Dataset) – with fields “prediction” and “truth”, see predict()