0
$\begingroup$

Assume you want to find the derivative respect to X ($p \times p$) matrix of $$ \frac{\partial}{\partial X} || X - A ||_1 $$

where A is ($p \times p$) matrix.

How can I do it?

$\endgroup$
0
$\begingroup$

Define $$\eqalign{ Y &= (X-A) \cr B &= {\rm abs}(Y) \cr G &= {\rm signum}(Y) \cr B &= Y\odot G \cr }$$ where the functions are applied element-wise.

Then find the differential and gradient of the norm as $$\eqalign{ \phi &= 1:B = 1:Y\odot G = G:Y \cr d\phi &= G:dY = G:dX \cr \frac{\partial\phi}{\partial X} &= G = {\rm signum}\big(X-A\big) \cr\cr }$$ In the above, the symbols {$\,:\,, \odot$} are used to denote the {Frobenius, Hadamard} products, respectively.

Also note that signum has a discontinuity at zero, where its value jumps between $-1$ and $+1$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.