1
$\begingroup$

Can I differentiate $$(\pmb{y}^o - (\pmb{x}\cdot\pmb{a})^o)^\top(\pmb{y}^o - (\pmb{x}\cdot\pmb{a})^o)$$ with respect to $\pmb{a}$? (I want to minimize the expression with respect to $\pmb{a}$.)

Here, $\pmb{y}^o$ means the ordered vector of $\pmb{y}$. For example, if $\pmb{y} = (2,9,1)^\top$, then $\pmb{y}^o = (1,2,9)^\top$ and $\pmb{x}\cdot\pmb{a} = (a_1x_1, \ldots, a_nx_n)^\top$.

Try: I wrote the vector $(\pmb{x}\cdot\pmb{a})^o$ as $\pmb{R}\pmb{x}\cdot\pmb{a}$, where $\pmb{R}$ is a matrix that keeps record of the orders. For the above example, it would be $$\pmb{R}=\begin{pmatrix} 0 & 0 & 1\\ 1 & 0 & 0\\ 0 & 1 & 0 \end{pmatrix}.$$ Then I can differentiate the expression w.r.t. $\pmb{a}$. However, the result comes in terms of $\pmb{R}$, which is unknown. (The solution for $\pmb{a}$, that minimizes the given expression, should come in terms of $\pmb{x}$ and $\pmb{y}$.)

$\endgroup$
7
  • $\begingroup$ Sorry, my mistake. Corrected. $\endgroup$
    – Shanks
    Commented Oct 4, 2021 at 8:14
  • $\begingroup$ This function is differentiable at any $a$ were sorting does not need a tie-break, i.e. where all entries are pairwise different (that's exactly where the map $a\mapsto a^0$ is differentiable). $\endgroup$
    – Dirk
    Commented Oct 4, 2021 at 10:20
  • $\begingroup$ Thanks, @Dirk, under your assumption, how to differentiate it? $\endgroup$
    – Shanks
    Commented Oct 4, 2021 at 16:46
  • $\begingroup$ As you said: Just treat the matrix R that does the rearrangement as constant - but you should probably treat it as R(xa). $\endgroup$
    – Dirk
    Commented Oct 5, 2021 at 5:22
  • $\begingroup$ But the solution for $\pmb{a}$, that minimizes the given expression, comes in terms of $\pmb{R}$, which is unknown in general. That was the problem I was facing. Please see the last line of the question. $\endgroup$
    – Shanks
    Commented Oct 5, 2021 at 5:48

0

You must log in to answer this question.