Skip to content

Commit 4838b56

Browse files
author
Alex Banwell
committed
Fix bug in seasonality calculation
1 parent d4688a0 commit 4838b56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aeon/forecasting/_ets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def _numba_predict(
353353
else:
354354
# Geometric series formula for calculating phi + phi^2 + ... + phi^h
355355
phi_h = phi * (1 - phi**horizon) / (1 - phi)
356-
seasonal_index = (n_timepoints + horizon) % seasonal_period
356+
seasonal_index = (n_timepoints + horizon - 1) % seasonal_period
357357
return _predict_value(
358358
trend_type,
359359
seasonality_type,

0 commit comments

Comments
 (0)