Explain
Detailed Explanation
This technique is a standard trick in Convex Optimization to handle the absolute value function . The absolute value is convex but not differentiable at , which can be troublesome for some gradient-based solvers.
By introducing two non-negative variables and setting , we can represent any real number. Ideally, we want and . However, the representation is not unique. could also be . In the optimization problem, we are minimizing the sum .
- Case 1 (): Sum = 5.
- Case 2 (): Sum = 205. Since we are minimizing, the solver will always prefer Case 1 (the disjoint support). This ensures that at the optimum, .
This transforms a non-differentiable term into a smooth linear term subject to simple linear constraints (). This is much easier for QP solvers to handle.