xesn.LazyESN.predict#
- LazyESN.predict(y, n_steps, n_spinup)#
Use the ESN to make a prediction
Note
This creates a new
ftimedimension, indicating the time since prediction initial conditions (forecast time). Theftimevector is created by subtraction:y["time"].values - y["time"].values[n_spinup]. Ify["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_spinupentries in timen_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+1along the newly createdftimedimension, created by differencing each timestamp and time at prediction initial conditions