Supervised Machine Learning: Regression and Classification : Programming Assignment: Week 2 practice lab Linear regression --> Incorrect grading

I have completed the codes and got the expected output. However, i got this error :
[mentor edit: code removed]

Code Cell UNQ_C1: Function ‘compute_cost’ is correct.
Code Cell UNQ_C2: Function ‘compute_gradient’ is incorrect. Check implementation.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

Need help

Please do not post your code on the forum. That is not allowed by the Code of Conduct.

Passing the tests in the notebook does not prove your code is perfect. The grader uses different tests and a different set of data.

Hint: Check your use of square brackets.

Thank you for the response and editing the post. Rookie mistake

No problem.

Were you able to fix the issue?

Yes sir

1 Like

Also select correct specialisation, course and week category. I have made the changed for this thread.

@AbishekSathiyendran, in the future, please be sure you post in the correct forum area for your course.

The course forums are in the “Course Q&A” area.


1 Like

Thanks and understood