0
$\begingroup$

Given a user ratings matrix which is $n \times p$, where $n$ users rate $p$ movies, I already have a row matrix $n \times 10$ which characterises the user.

I ideally wanted to use the TF was method for optimisation, https://www.tensorflow.org/versions/master/api_docs/python/tf/contrib/factorization/WALSMatrixFactorization but it looks like it creates the row matrix itself.

What I need is to create the column matrix - which is $10 \times p$ (not both), containing the relationship between hidden characteristics (10) to the movies (p).

How can I do this in TF?

$\endgroup$
1

1 Answer 1

2
$\begingroup$

If R is the rating matrix, U is the user matrix and M is the movie matrix, then note that there is almost certainly no matrix M that satsifes $R = UM$. U and M are too low rank. However you should be able to find the matrix M that minimizes $|R - UM|$.

There is no need to use an optimizer, though you could I guess, because this is a convex problem. You're just solving a large linear system. This is indeed just what ALS does repeatedly.

You've found an ALS solver and if you just need to solve one step and have the user matrix already, I think you just supply it as row_init and run one iteration? haven't used it, but conceptually that's all you are doing. You don't need weights either.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.