Could you give me some examples and/or references on "risk-averse" loss functions (i.e. penalizing the underestimates more then the overestimates)?


Bayesian Methods for Hackers has a pretty informative chapter on loss functions and touches on this. They provide python function below as an example of a loss function that penalizes overestimates more heavily:

def stock_loss(true_return, yhat, alpha = 100.):
    if true_return * yhat < 0:
        #opposite signs, not good
        return alpha*yhat**2 - np.sign(true_return)*yhat \
                        + abs(true_return) 
        return abs(true_return - yhat)

Note: you don't need to go full bayesian for this chapter to be relevant


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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