Practice lab: Linear regression Week 2

While submitting "Programming Assignment: Week 2 practice lab: Linear regression " for grading I am again and again receiving the error, despite the fact that all codes are correct and all expected outcomes are correct. I need urgent help in this regard. “Code Cell UNQ_C1: Function ‘compute_cost’ is incorrect. Check implementation.
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”

Dear @mtaimoor23,

Kindly share a screenshot of the error message so I can assist you more effectively.


Keep Learning AI with DeepLearning.AI - Girijesh

This means your compute_cost() function does not work correctly.

The grader uses different test cases than the ones in the notebook.

Passing the notebook’s tests does not prove your code is perfect.

Please find attached the error.

There is nothing attached.

Please do not post your code on the forum - only the error messages.

Code Cell UNQ_C1: Function ‘compute_cost’ is incorrect. Check implementation.
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.

I have again implemented the codes; all outcomes are correct but still grade received is “0”

Dear @mtaimoor23,

Can you send me your code via DM? I’ll look into the issues and let you know the solutions.


Keep Learning AI with DeepLearning.AI - Girijesh

@mtaimoor23, please do not share your code on the Forum. That is not allowed by the Code of Conduct.

Instead, you can click on the @Girijesh user name, then click on the Message button. That will allow you to attach your notebook to a private message.