when I tried to do the diff moving avg,
This is my diff_moving_avg line:
diff_moving_avg1 = moving_average_forecast(diff_series, window_size=50)
the difference moving average for whole SERIES has shape=(1411,)
but when i sliced it
This is the expected output suggested by the assignment. In addition, this is a moving average calculation. However, the forecast’s y axis(value) is way off the value of the original data. This means there is something wrong with the diff_moving_avg1 function.
so did you play around with the values to see if gives a different result? you have used window size of 50, do you feel as general rule of thumb you are using the correct value?..
I am sharing post comment which explains a bit of same, it will probably help you make changes and try again
Yes, the strange part that i dont understand is that by making the window size bigger (i.e.=500) the DMA should smoothout across the graph. But when I tried that the DMA forecast does not change. Did I plot the wrong function? Or did the program somehow stored the wrong value?
Also another one that might be problematic is that my np_forecast was prompted to have the wrong shape. Shouldn’t the forecase of the entire series have 14XX as the shape as it contains 14XX numbers? How come the unitest algo suggests that it should only contain 25 data points?
The MA forecast graph was the same as the expected output by the way.
As par what I saw here, you are using a global variable for WINDOW_SIZE, where as the call argument for moving average forecast is recalled for the particular grade cell as window_size
please go through my previous linked comment shared here where the learner has similar issue s yours and there were multiple code errors, so go through that post and compare your codes as one of the error is similar as shared by that learner especially the moving_average_forecast.
There were more errors by that learners, so you can cross verify those errors with your codes.
let me know if grader is fails still after making those correction.
The grader is working perfectly fine, there is error in your codes for moving average forecast.
select all file except the assignment file and then delete.
Next select the assignment file and rename it, so the updated version gets download.
If you do not want to save the old copy, you can delete the assignment file too. In case you deleted the assignment file too, you get a 404 error in your screen.
if you don’t delete and rename the file, you do not get 404 error.
At this time, click on the right top corner, and then click reboot.
Once rebooting is done, click again, now click Get the latest Version and then Update Lab.
You have the latest copy of assignment to workup on.
you are doing same mistake the learner has done in linked post here.
you are only checking the data split codes, but your error could be related to other codes cell, so go through the linked post points one by one, and compare your codes.
for diff_moving_avg where you perform correct slicing, that is again incorrect, taking len of series_valid will not get you diff moving avg.
it should be [SPLIT_TIME-365-WINDOW_SIZE:]
you were before doing the same mistake but later correction still required correction as you used value 50 instead of using WINDOW_SIZE:
Please also make sure to use it capitals only.
you have shared your codes for naive forecast, so I cannot confirm on that.
Your compute metrics codes are also incorrect, you hard coded the path which again can cause autograde failure.
don’t recall the metrics value separately as errors And then use in calculating the mse and mae, directly use it in the calculation the mse and mae.
Another mistake, you are using incorrect function recall to calculate mse and mae.
It should be tf.keras.losses.MSE(args metrics assigned for that grade cell).numpy( )