C3_W2 - Practice Lab 1: Mean Normalization

Have the vectors w,x, and scalar b from the MovieLens data set been normalized previously (Mean Normalization)? Haven’t they?

image

Thanks

Hi @cajumago,

w, x, and b are learnt by the algorithm.

Raymond

Yes, it makes totally sense,
But those values were updated to the files (small_movies_W.csv, small_movies_X.csv, small_movies_b.csv) from scratch by the practice lab algorithm -or- did they come pre-learned from the MovieLens data set?

I didn’t prepare for those files, but apparently those weights are pre-calculated (guessed from the name of the function), and they are the parameters to be trained for. You might randomly initialize those parameters and see how many iterations of learning needed to achieve a good set of weights?
Raymond

Back to my first question:


Yes, those values are pre-computed, so my question was if the method used was Mean Normalization (C2_W2 - Lecture: Mean Normalization). But I understand that you didn’t prepare those files. Additional insights will be appreciated.

I did initialize those parameters with zeros and ones and there are changes on Cost/Cost(with regularization), but there are no changes on Training loss at iterations. So it seems that it doesn’t matter how to initialize those parameters since in this part:
image

Ymean and Ynorm are normalized, thereby, I see that the iterations of learning are the same with the same loss.

Am I on the right path?

@rmwkwok , I’m sorry if I’m missing something. I’m just trying to understand how the initial files are structured.

Thanks!

Hello Carlos, thank you for the questions!

No, it won’t be Mean normalization. To use mean normalization, you will need to have some features in the first place, but this is not the case here. Here we only have rating scores and nothing about users nor about movies on which you can apply mean normalization.

Since I did not do the pre-calculation myself, I don’t know the exact way, but it can be that the assignment designer spent some time to pre-train a good set of X, W, b values and save it for the assignment, or those values are calculated with some matrix factorization method such as Singular Value Decomposition. We can only make guesses here.

I don’t see how you initialize the W X b values to zero.

Y and R should not be relevant in this discussion.

Raymond

PS: I edited the title of this topic to C3_W2.

Hello Carlos,

I just read the assignment again, and find that the W X b values are randomly initialized before training:

See the tf.random.normal code? So modifying anything right after the line for load_precalc_params_small will not change anything for the training process because they will be reinitialized right before the training, and that explains why you did not see any change in loss in those interations of training. It is my bad and I should not have asked you to try that.

Please let me know if you still have any follow-up about mean normalization.

Raymond