C4 W1, diff_moving_avg_plus_smooth_past

I am currently working on Exercise 8 involving smooth_past_series and facing some issues. Below is the code snippet and the output I obtained:
Posting codes correct or incorrect, sharing links to graded assignment, sharing notebook assignment is against community guidelines. kindly refer Code of Conduct and How to Use the Forum for better understanding of community guidelines

Output I Got:

Failed test case: diff_moving_avg_plus_smooth_past has incorrect first 5 values.
Expected: [55.13228 54.10422 53.275375 52.182724 51.436935]
Got: [48.96211 52.344227 55.13228 54.10422 53.275375]

Failed test case: diff_moving_avg_plus_smooth_past has incorrect last 5 values.
Expected: [28.81515 31.856792 35.53977 39.16417 42.837337]
Got: [21.733616 25.267376 28.81515 31.856792 35.53977 ]

How can I adjust my implementation to get the diff_moving_avg_plus_smooth_past output that matches the expected results?

Posting solution code in a public topic goes against our Community Forum Code of Conduct. It’s okay to share stacktrace on a public post and send code to a mentor via direct message.

Please edit your post.

Here’s a guide on how to edit a post.

Does this help?

did you ever get this sorted? I also have this issue;

exercise 8 smooth_past_series of C4W1_assignment (in course: Sequences, Time Series and Prediction)
is not returning the required values.

How did you proceed? I found myself just guessing the correct split of SERIES , without success. Many thanks

@Cormac_Garvey

the below post might help you debug your codes

1 Like

Cheers Deepti, that helped all right and i got the solution… But i dont understand it so a query please…

I have the following values…

length of series: 1461
SPLIT_TIME: 1100
WINDOWS_SIZE: 11
period = 365

Where does the number 370 come from??
Where does the number 359 come from??

Many thanks in advance.

hi @Cormac_Garvey

this should explain your question

Let me know if you still have any doubts.

Regards
DP