C4W1 Working with Generated Time Series grading problem “series_valid” not defined

hi @mdaniyalnasir

Probelm with codes starts from

  1. grade function diff moving average.
    For code line
    Perform the correct slicing
    You are suppose to mention the slicing using the SPLIT TIME AND WINDOW_SIZE instead of using len function of series valid as using len function of series would prevent the end range at which correct slicing would be required.

  2. Grade function diff moving average plus past
    For code line
    Slice the whole SERIES to get the past values.
    You want to get the value from the previous period for each forecasted value
    past_series = @REPLACE EQUALS SERIES[None:None] the None again wants you to replace the values previous period.

Read this explanation again

Now let’s bring back the trend and seasonality by adding the past values from t – 365. For each value you want to forecast, you will be adding the exact same point, but from the previous cycle in the original time series.

t is your SPLIT TIME, the past value is t-365 and the previous cycle would be again 365.

this could be exactly how you mention for naive forecast except for the past value cycle here being 365.

These both issue were mentioned in the link comment I previously shared with you.