Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Your solution is here
- ## Problem 1
- $$
- \frac{1}{2} ||X - UV||^2_F =
- \frac{1}{2} \langle X - UV, X - UV \rangle =
- \frac{1}{2} (\langle X, X \rangle - 2 \langle X, UV \rangle + \langle UV, UV \rangle)
- $$
- ### U derivative
- $$
- d F(U, V) =
- \frac{1}{2} (2 \langle d(UV), UV) \rangle - 2 \langle d(UV), X \rangle =
- \langle UV, dU V \rangle - \langle X, dU V \rangle =
- \langle UVV^* - XV^*, dU \rangle
- $$
- Then, $grad F(U, V)$ w.r.t. U equals $(UV - X)V^*$
- ### V derivative
- Accordingly, we get gradient w.r.t. V: $grad F(U, V) = U^*(UV - X)$
- ### Complexity
- We multiply $n \times k$ matrix with $k \times n$, what gives us $O(n^2 k)$ complexity. Then we have a sum of 2 matrices, which has $O(n^2)$ complexity and finally we have muliplication with complexity $O(n^2 k)$. Summing up results, we have complexity of $O(n^2 k + n^2 + n^2k) = O(n^2 k)$
- ## Problem 2
- $$
- d R(x) =
- \frac{\langle x, x \rangle d\langle Ax, x \rangle - \langle Ax, x \rangle d \langle x, x \rangle}{\langle x, x \rangle^2} =
- \frac{\langle x, x \rangle \langle (A + A^T) x, dx \rangle - \langle Ax, x \rangle \langle x, dx \rangle}{\langle x, x \rangle^2} =
- \frac{\langle \langle x, x \rangle (A + A^T)x - \langle Ax, x \rangle x\rangle, dx}{\langle x, x \rangle^2}
- $$
- ## Problem 3
- Let's denote $\sum_{i = 1}^{m} w_i x_i x_i^T$ as $S$.
- Then we have:
- $$
- d f(w) = \frac{\det S * \langle S^{-T}, dS \rangle}{\det S} =
- \langle S^{-T}, dS \rangle
- $$
- Let's find derivative of $S$ w.r.t. $w_i$:
- $$
- \frac{\partial S}{\partial w_i} = x_i x_i^T
- $$
- Then we can derive a coordinate of the gradient we are looking for:
- $$
- \frac{\partial f(w)}{\partial w_i} = \langle \left( \sum_{i = 1}^{m} w_i x_i x_i^T \right)^{-T}, x_i x_i^T \rangle
- $$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement