Help with regularization term for J (cost) #week2

Hello:

Heeeeeelp. I need some help with the C3_W2_Collaborative_RecSys_Assignment. I managed to create the correct code to calculate J (the cost) non regularized:

{moderator edit - solution code removed}

So, I tried:

{moderator edit - solution code removed}

And did NOT work. What am I doing wrong? Please help ! Help.

Thank you !

Desperate Student.

Ahhh I found my mistake. I inserted the regularization term inside the inner loop. Problem solved. Thank you.

1 Like

It’s great you found the solution.

Just a reminder: In the future please do not share your code on the forum. That’s not allowed by the Code of Conduct.

1 Like

ops, Sorry. It will not happen again. Thank you.