Week 2: Collaborative cost filtering function: regularization applied to all points or just those with a rating?

The cost function that is given in the text is:

Cost: the sum of (ypredict-yactual)^2 for all points with ratings
Regularization: the sum of w^2 + the sum of x^2

My instincts say that the regularization term should only be applied to (user,movie) points with ratings, but this is not noted in the text. Is this correct?

1 Like

The regularized portion of the cost uses only the weights (W) and features (X).

The rating mask (R) is only applied to the outputs (Y).