Help me to understand diff_moving_average

i dont get any idea in here why we need to subtract the split image by 365 and 30 in order to get the validation time step, since the time_split itself already get into validation itself

# Slice the prediction points that corresponds to the validation set time steps
diff_moving_avg = diff_moving_avg[split_time - 365 - 30:]

# Slice the ground truth points that corresponds to the validation set time steps
diff_series = diff_series[split_time - 365:]

Dose this help?

ok so the point I got is using a backward moving average, so why is it still subtracted by 30? isn’t that a large number? i mean is subtract by 365 isn’t enough?

Did you think about the window size used for creating the moving average?