Alternating Least Squares Derivative

963 Views Asked by At

I'm trying to understand recommender systems that use ALS by reading up some content here : https://blog.insightdatascience.com/explicit-matrix-factorization-als-sgd-and-all-that-jazz-b00e4d9b21ea

I don't understand how the second equation follows from the first equation : enter image description here

Moreover, x(u)_T seems to have dimensions : k x 1 and Y_T seems to have the dimensions k x m

In that case, how can these matrices be multiplied ?

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

$\frac{\partial L}{\partial x_u}$ is thought of as a row vector here (or a 1xk matrix). $(r_{ui}-x^T_uy_i)$ is a number, and $y_i^T$,$x_u^T$ is 1xk. So the dimensions of the first equation are ok.

Define $Y$ to be the matrix of $y_i^T$ as rows. So $Y$ is a matrix of $y_i$ as columns, i.e. nxk. Then $[x_u^TY^T]_i=x_u^Ty_i$. In other words $x_u^Ty^T$ is (1xk). Can you finish it from here?