ctf4science.eval_module.long_time_forecast_spatio_temporal#
- ctf4science.eval_module.long_time_forecast_spatio_temporal(truth: ndarray, prediction: ndarray, k: int, modes: int) float#
Compute the long-time forecast score for spatio-temporal systems (spectral).
Compares averaged PSD of the last k time steps for truth and prediction over modes Fourier modes; score is
100 * (1 - psd_error)so that 100 is perfect.- Parameters:
- truth(T, S) ndarray
Ground truth, shape (time steps, spatial points).
- prediction(T, S) ndarray
Predicted data, same shape as truth.
- kint
Number of last time steps to use for PSD.
- modesint
Number of Fourier modes from the center frequency.
- Returns:
- float
Long-time forecast score as a percentage (100 = perfect).