0

I have the following system to minimize with respect to $\beta$ ($\phi$ and $\mathrm{y}$ are known) using Huber loss

$ \mathrm{argmin}_{\beta\in R^2}(\phi\beta-\mathrm{y}) $

where, for example,

$ \phi\beta-\mathrm{y} = \begin{bmatrix} \cos(0) & \sin(0) \\ \cos(1) & \sin(1) \\ \cos(2) & \sin(2) \end{bmatrix} \begin{bmatrix} \beta_{0c} & \beta_{1c} & \beta_{2c} \\ \beta_{0s} & \beta_{1s} & \beta_{2s} \\ \end{bmatrix}- \begin{bmatrix} y_1 & y_2 & y_3 \\ y_4 & y_5 & y_6 \\ y_7 & y_8 & y_9 \end{bmatrix} = \begin{bmatrix} \cos(0)\beta_{0c}+\sin(0)\beta_{0s}-y_1 & \cos(0)\beta_{1c}+\sin(0)\beta_{1s}-y_2 & \cos(0)\beta_{2c}+\sin(0)\beta_{2s}-y_3 \\ \cos(1)\beta_{0c}+\sin(1)\beta{0s}-y_4 & \cos(1)\beta_{1c}+\sin(1)\beta_{1s}-y_5 & \cos(1)\beta_{2c}+\sin(1)\beta_{2s}-y_6 \\ \cos(2)\beta_{0c}+\sin(2)\beta_{0s}-y_7 & \cos(2)\beta_{1c}+\sin(2)\beta_{1s}-y_8 & \cos(2)\beta_{2c}+\sin(2)\beta_{2s}-y_9 \end{bmatrix} $

Huber loss is defined as

$ \gamma_\zeta(x) = \begin{cases} \dfrac{1}{2}x & |x| \leq \zeta \\ \zeta|x|-\dfrac{1}{2}\zeta^2 & |x| > \zeta \end{cases} $

Problem Description:

I would like to know how to vectorize the function. I'm confused what the value of $\mathrm{x}$ should be. In this question the answer mentions that "the input is a vector the Huber Loss is applied component wise and then all results are summed" but it doesn't really describe that part.

I think that's what I need to do, but not sure what it means. Any help would be much appreciated!

  • What this basically means is that if you have a vector input $x = (x_1,x_2,x_3)$, then $f(x) = \gamma(x_1) + \gamma(x_2) + \gamma(x_3)$ where $\gamma$ is the scalar function you listed. – Y. S. Mar 22 '21 at 18:58
  • @Y.S. Thank you for your help! I think you should have made that an answer instead of a comment – Aaron Ahn Mar 22 '21 at 19:56
  • 1
    Using the all-ones vector ${\tt1}$ to translate the quoted description into a mathematical equation is straightforward $;f(x) = {\tt1}^T\gamma(x)\quad$ – greg Apr 09 '21 at 12:47

0 Answers0