algorithmoptimizationmathematical-optimizationminimization

Fast/efficient computation with deadzone linear loss function


I am interested in modelling data with a loss function that is piecewise linear: zero between a lower and upper bound, then linear from zero outside of these bounds. This is very close to my "real" loss function, specifically there's a couple of boundaries associated with real boundaries in my equipment, outside of which I begin to care about linearly. Inside of them, I do not much care.

Is there a fast algorithm or computation trick to get nearer to this optimum? The best solution I can imagine is a linear program. Any tricks, guidance, possible approaches, or approximations would be greatly appreciated. Cheers!


Solution

  • First of all, consider the derivative of abs(x - a) + abs(x - b). For x < min(a, b) it is -2, for x > max(a, b) it is +2, and for a <= x <= b it is zero - so your piecewise linear penalty is the sum of two absolute functions (or two L1 norms).

    Thus it might be worth looking at the considerable body of work devoted to minimising the L1 norm of deviation - for example, https://en.wikipedia.org/wiki/Iteratively_reweighted_least_squares. In fact, I think you can take the algorithm for interatively reweighted least squares minimisation of L1 norms and modify it to handle your dead zone function without explicitly converting each dead zone function into two absolute functions.