// Determine the number of iterations that will take place. Must// guarantee that the forecasting horizon will not over-index the seriesall_indices = np.arange(n_samples)for train_step_size in range(0, n_samples - h - initial, step):
train_size = initial + train_step_size
train_indices = all_indices[:train_size]
test_indices = all_indices[train_size: train_size + h]