1. Yin

    Hi, I want to ask whether “ratings_t = tf.matmul(Uk, Si)” should be “ratings_t = tf.matmul(Su, Si)”?

  2. Vincent

    Compute reduced matrices

    Sk = tf.diag(St)[0:nb_factors, 0:nb_factors]
    Uk = Ut[:, 0:nb_factors]
    Vk = tf.transpose(Vt)[0:nb_factors, :]

    Hi, I just want to ask , there should be a transpose operation when calculating the Vk matrix. Or else the shape of ratings would be incorrect.

  3. Yongguang Zhang

    That’ what I need! thx!
    BTW, I think it’s will look better if u wrote the code of training process.
    I mean cost and train_op.
    It’s make it easier to understand for the beginer.
    Thanks again.

    • Hi,
      thanks! In this case, the training process is done through the SVD. An alternative approach which is based on a cost function (mean squared error) and a training operator is the Non-Negative Matrix Factorization. I’m going to add this example in a future post.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.