Regularization C3_W2_Collaborative_RecSys_Assignment: Exercise 1 errors

I need help on the regularization part of this exercise.

1 Like

Hi!

You’re multiplying the regularization term by an extra 1 / 2

Looking at the Cost Function with Regularization we can pull a 1 / 2 term out and multiply by 1 / 2 at the end.


Which is what the J = J / 2 does in the code.

The problem is that the( / 2) was left in the regularization calculation instead of being removed.

Hope this helps

2 Likes

Yeah, it does help.

Thanks a lot, Sam