Gradient of weird cost function

43 Views Asked by At

let's say I have some matrix $D \in \mathbb{R}^{n\times n}$, and $D = f(x)$, where $x$ is some variable data tuple. We also have known vectors $y$ and $y'$, where $y,y' \in \mathbb{R}^{n \times 1}$. Is there a way to solve the following linear programming formulation:

$\underset{x}\min \|D(x)y - y'\|_{2}^{2}$

In short, how do I find the gradient of $\|D(x)y - y'\|_{2}^{2}$ ?