ctf4science.eval_module.short_time_forecast#
- ctf4science.eval_module.short_time_forecast(truth: ndarray, prediction: ndarray, k: int) float#
Compute the short-time forecast score (relative L2 over first k steps, as percentage).
Uses the first k time steps of truth and prediction; score is
100 * (1 - relative_L2_error)so that 100 is perfect.- Parameters:
- truth(T, F) ndarray
Ground truth, shape (time steps, features).
- prediction(T, F) ndarray
Predicted data, same shape as truth.
- kint
Number of initial time steps to use.
- Returns:
- float
Short-time forecast score as a percentage (100 = perfect).