J.
09/06/2023, 8:39 AM# Find timeseries with least data
min_ts_count = big_df_for_stats.groupby(by="unique_id").count()["y"].min()
# This is the amount of minimum trained wanted for rolling! window
initial_training_size = 365
step_size = 4
h = 1
test_size_parameter = ((min_ts_count - initial_training_size)//step_size)
# This is the workaround to prevent the exception which happens when "(test_size-h)%step_size != 0"
test_size_parameter = test_size_parameter - (test_size_parameter%step_size) + h
res_df = sf.cross_validation(h=h, step_size=step_size, fitted=True, test_size=test_size_parameter, n_windows=None)
José Morales
09/07/2023, 4:50 PMStatsForecast.forecast
on that subset.J.
09/08/2023, 9:55 AM