0

I want to minimize the following convex function over $\delta$:

$$g(\delta) = \sum_i \sum_j | \Sigma_{ij} - S_{ij} - \delta v_iv_j |$$

Here all variables $\Sigma_{ij}, S_{ij}, v_i, v_j$ are constants. How can I do so?

Attempt

I found a similar problem, where the second answer suggests using $\frac{d|x|}{dx} = \operatorname{sign}(x)$, and thus I can try setting the subgradient equal to 0

$$\frac{\partial}{\partial \delta} g(\delta) = \sum_i \sum_j \operatorname{sign}(\Sigma_{ij} - S_{ij} - \delta v_iv_j) v_iv_j = 0$$

However, I don't know how to solve for $\delta$.

Gary
  • 31,845
Ben10
  • 316

1 Answers1

1

You can write the problem as $f(x) = \sum_k |a_kx-b_k|$ and assume that $a_k >0$. Note that $f$ is convex and piecewise affine. To find the solution(s), you just need to find the $x$ for which $0 \in \partial f(x)$.

Define the breakpoints $B= \{ \beta_k \}_k$ by $\beta_k = {b_k \over a_k }$, and assume that they are ordered (possibly repeated). $f$ is differentiable except at the breakpoints, and the slope is given by $f'(x) = \sum_k a_k \operatorname{sgn} (a_k x -b_k)$.

Hence the slopes (which will be non decreasing) starting at $x< \beta_1$ are $s_0=-(a_1+\cdots +a_p), s_1=a_1-(a_2+\cdots + a_p), \cdots ,s_p=(a_1+\cdots + a_p)$. The subdifferential at the breakpoints will be the interval of the slopes just to the left and right of the breakpoint.

To find the minimisers, find the largest $k_1$ such that $s_{k_1} < 0$ and $s_{k_1+1} \ge 0$ and the smallest $k_2$ such that $s_{k_2} \ge 0$ and $s_{k_2-1} > 0$. Then the minimisers will be $[\beta_{k_1}, \beta_{k_2}]$.

copper.hat
  • 172,524