What is the gradient of the function w.r.to U ?.
$$ \operatorname{trace}\big((W \odot (A-UV'))'(W\odot (A-UV'))\big) $$
Here, $\odot$ is the Hadamard product and $'$ is the transpose. It seems like the gradient is $2(W\odot(UV'-A))V$. Can anyone explain me how we get this ?
Let's use a colon to denote the trace/Frobenius product $$A:B={\rm tr}(A^TB)$$ For typing convenience, let's also define two additional matrices $$\eqalign{ Y &= UV^T-A \cr X &= W\odot Y \cr }$$ Write the function in terms of these new variables and find its differential and gradient $$\eqalign{ \phi &= X:X \cr d\phi &= 2X:dX \cr &= 2X:(W\odot dY) \cr &= 2(W\odot X):dY \cr &= 2(W\odot X):dU\,V^T \cr &= 2(W\odot X)V:dU \cr \frac{\partial\phi}{\partial U} &= 2(W\odot X)V \cr &= 2(W\odot W\odot Y)V \cr &= 2\Big(W\odot W\odot(UV^T-A)\Big)V \cr }$$