0
$\begingroup$

I am working on a regression problem where I want to model the loss function in a way that it "punishes" to big errors much more than small errors (so I am in the realm of exponential functions) but also in a way that is punishes a negative error much more than a positive error.

So for example:

  • Prediction off by +4.0: is a problem, but still ok
  • Prediction off by +0.5: not a big deal
  • Prediction off by -0.5: is a problem, but still ok
  • Prediction off by -4.0: is a major problem

My problem is that I cant find a good function to describe this. x squared and so do not have the higher values for negative inputs that I am looking for.

My best workaround for now is to just move the whole function to the right (x-2)^​2, but there must be something better?

$\endgroup$

1 Answer 1

1
$\begingroup$

This should be possible using a piecewise exponential loss, something like this:

$ f(x) = \begin{cases} x^2 & x < 0\\ \lambda x^2 & x \ge 0 \end{cases} $

with $0 < \lambda < 1$. A $\lambda$ of around 0.02 should roughly give you the scale you want.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.