C3_W2_Collaborative_RecSys_Assignment regularization does not work

Hi,

In the assignment, when implement the no regularization formula I get correct results for the first output but not the regularized ones. when I do implement the regularizaiton formula, I get zero for the non-regularized term (which is expected actually since it multiplies all with 0) but the rest of the output is wro

{moderator edit: code removed}

ng as well. I have a hard time understanding what is wrong here, is the suggested formula wrong?

Urgent help needed, thanks! :slight_smile:

Here is a starting point for you to consider:

Your code is computing w and b_j, and x, y, and r, but you aren’t using any of them. What is your strategy in this code?

Hi @TMosh ,

Thanks for the feedback, I have been actually trying out different cost functions and this is just one of them since it was in the solutions. I think we need to add the regularization to the cost function as in the description formulas but that doesn’t work either, ie.

{moderator edit: code removed}

which should correspond to this?

You are adding the regularized term to the cost nu*nm times instead of once. Please compute the regularized term outside the loops.

I’m removing the code from the thread, as that’s not allowed by the code of conduct.