Facing problem in C3_W2_Collaborative_RecSys_Assignment Lab class

Hello !!

I am getting an AssertionError in this lab class. Here is the attachment. Please help me to understand what is wrong here!! Thank you.

The error is telling you that there is an issue with the regularisation term of the cofi_cost_function implementation from your side! check that functions especially the regularization, your implementation of it is probably wrong!

Thank you for replying.

But I have rechecked the given hint. It is still coming same error. Please help me to understand more explicitly.

The part of the message that says to “check the regularization” is just a hint about one common mistake. It does not necessarily apply to your code.

The fact remains that your code does not return the correct cost value for one of the tests in public_tests.py.

You can read this file (by using the File->Open menu), and inspect what conditions that test is using. This can help you debug you code.

1 Like

Hi

I have tried all the things but the same error is coming again and again. Can I share my code by personal message ? Actually for particularly this lab, I am embarrased. Please give me the next direction. Thank you.

Follow-up for those who find this thread later.

The error was in adding the regularized part of the cost inside the for-loops.