I know that we shift 365 so the split_time - 365, and due to the window_size is 11, so we need to increase 5 more, so it becomes split_time - 370, that’s make sense.
For the last: -359, due to shift 365, so at first it will be -365. But the window_size is 11, so we need to increase 5 more. It should be -360.
Why the code is -359 here?
Please explain more for this case.
Hi Gent,
Thanks for the answer.
I think I can figure it out. Actually, it comes from the function:
moving_average_forecast(series, window_size)
It calculates the average for each pack of window_size items but exclude the last item of series. So to count enough items for output of moving_average_forecast. We need to increase one more position, that is why it would be -359, not -360.
I have a doubt regarding calculation of smooth_past_series.
I was calculating the past_series using SERIES[SPLIT_TIME-365:-365]
Now when I calculate smooth_past_series, with window size of 10 shouldn’t it be moving_average_forecast(SERIES[SPLIT_TIME-365:-365], 10) ?
Problem with this logic is I end up with only 351 elements after calculating moving_average and diff_moving_avg is 361. As result I wont be able to add smooth_past_Series and diff_moving_avg
With window size of 11, right answer seems to be moving_average_forecast(SERIES[SPLIT_TIME-370:-359], 11). I am not sure why 370 and 359? Can anyone explain why ?