1
$\begingroup$

I have following expression:

$||Y- XW||_F^2$.

Where

$Y \in R^{n \times K}, X \in R^{n \times p}, W\in R^{p \times K}$

I would like to take the derivative of it w.r.t W and here is what I think it should be : $-2X||Y-XW||_F$ I'm not sure whether this is the right derivation. Could you please check it ?

  • 4
    What is the Forbiouns norm? Are you thinking of the Frobenius norm?2017-01-31
  • 0
    Yes, was tyop. sorry.2017-01-31
  • 1
    Yes, a tyop indeed!2017-01-31
  • 0
    looks like that something is going wrong with my keyboard2017-01-31

1 Answers 1

1

As $\|A\|_F^2=\langle A,A\rangle_F$, $\langle A,B\rangle_F=tr(A^TB)$, you get that the directional derivative of your expression is $$ 2·tr((Y-XW)^TX\dot W)=\langle 2X^T(Y-XW),\dot W\rangle_F $$ so that the gradient in the usual interpretation is $2X^T(Y-XW)$. That is, the directional derivative is the scalar product of gradient and direction vector, and then the derivative the corresponding linear functional.